From f020023007aca7328e4bc5701b2e3edaa71a5378 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 9 Jun 2023 18:20:12 -0700 Subject: [PATCH 01/39] Configure CUDA 12.0 GHA builds --- .github/workflows/build.yaml | 8 ++++---- .github/workflows/pr.yaml | 12 ++++++------ .github/workflows/test.yaml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f4349bb89..1bf63c618 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -38,7 +38,7 @@ jobs: if: github.ref_type == 'branch' needs: [python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@ with: arch: "amd64" branch: ${{ inputs.branch }} @@ -51,7 +51,7 @@ jobs: python-build: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -60,7 +60,7 @@ jobs: upload-conda: needs: [cpp-build, python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@cuda-120 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 150debb86..11ff7a276 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,32 +18,32 @@ jobs: - conda-python-tests - docs-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-120 checks: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@cuda-120 conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120 with: build_type: pull-request docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120 with: build_type: pull-request node_type: "gpu-v100-latest-1" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 39b8ac83b..c4ad5f462 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-python-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120 with: build_type: nightly branch: ${{ inputs.branch }} From 7821b1dbb7400c553bd5351137be612b42911860 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 9 Jun 2023 18:48:07 -0700 Subject: [PATCH 02/39] Update cuCIM dependencies for CUDA 12 --- dependencies.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dependencies.yaml b/dependencies.yaml index d314b2e19..f4f62f017 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -72,6 +72,16 @@ dependencies: cuda: "11.8" packages: - nvcc_linux-aarch64=11.8 + - matrix: + arch: x86_64 + cuda: "12.0" + packages: + - cuda-nvcc_linux-64=12.0 + - matrix: + arch: aarch64 + cuda: "12.0" + packages: + - cuda-nvcc_linux-aarch64=12.0 checks: common: - output_types: [conda, requirements] @@ -97,6 +107,12 @@ dependencies: cuda: "11.8" packages: - cudatoolkit=11.8 + - matrix: + cuda: "12.0" + packages: + - cuda-cudart-dev=12.0 + - libnvjpeg-dev=12.0 + - libcufile-dev=1.5 docs: common: - output_types: [conda, requirements] From 48ffa077a8909238b1bd0ba304b0fbb20c7009cc Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 9 Jun 2023 18:56:16 -0700 Subject: [PATCH 03/39] Run RAPIDS dependency file generator --- .../all_cuda-120_arch-x86_64.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 conda/environments/all_cuda-120_arch-x86_64.yaml diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml new file mode 100644 index 000000000..ec81e9189 --- /dev/null +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -0,0 +1,51 @@ +# This file is generated by `rapids-dependency-file-generator`. +# To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. +channels: +- rapidsai +- rapidsai-nightly +- conda-forge +- nvidia +dependencies: +- GPUtil>=1.4.0 +- c-compiler +- click +- cmake>=3.23.1,!=3.25.0 +- cuda-cudart-dev=12.0 +- cuda-nvcc_linux-64=12.0 +- cupy >=12.0.0 +- cxx-compiler +- gcc_linux-64=11.* +- imagecodecs>=2021.6.8 +- ipython +- jbig +- libcufile-dev=1.5 +- libnvjpeg-dev=12.0 +- libwebp-base +- nbsphinx +- ninja +- numpy >=1.21.3 +- numpydoc +- openslide-python>=1.1.2 +- pip +- pre-commit +- psutil>=5.8.0 +- pydata-sphinx-theme +- pytest-cov>=2.12.1 +- pytest-lazy-fixture>=0.6.3 +- pytest-xdist +- pytest>=6.2.4 +- python>=3.8,<3.11 +- recommonmark +- scikit-image >=0.19.0,<0.21.0a0 +- scipy +- sphinx<6 +- sysroot_linux-64==2.17 +- tifffile>=2022.7.28 +- xz +- yasm +- zlib +- zstd +- pip: + - opencv-python-headless>=4.6 +name: all_cuda-120_arch-x86_64 + From af84898e16fd5743cb3a43a89a02989958e28797 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 27 Jun 2023 18:18:04 -0700 Subject: [PATCH 04/39] Update Conda recipes for CUDA 12 --- conda/recipes/cucim/conda_build_config.yaml | 6 +++++ conda/recipes/cucim/meta.yaml | 18 ++++++++++--- .../recipes/libcucim/conda_build_config.yaml | 16 +++++++++++ conda/recipes/libcucim/meta.yaml | 27 +++++++++++++++++-- 4 files changed, 62 insertions(+), 5 deletions(-) diff --git a/conda/recipes/cucim/conda_build_config.yaml b/conda/recipes/cucim/conda_build_config.yaml index ccc49851a..fb04ce5c8 100644 --- a/conda/recipes/cucim/conda_build_config.yaml +++ b/conda/recipes/cucim/conda_build_config.yaml @@ -4,5 +4,11 @@ c_compiler_version: cxx_compiler_version: - 11 +cuda_compiler: + - cuda-nvcc + +cuda11_compiler: + - nvcc + sysroot_version: - "2.17" diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index afbf439bc..714cb0bfd 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -38,13 +38,22 @@ requirements: build: - {{ compiler("c") }} - {{ compiler("cxx") }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} ={{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} + {% endif %} + - cuda-version ={{ cuda_version }} - cmake >=3.23.1,!=3.25.0 - make - ninja - sysroot_{{ target_platform }} {{ sysroot_version }} host: - click - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} + {% if cuda_major == "11" %} + - cudatoolkit + {% endif %} - cupy >=12.0.0 - libcucim ={{ version }} - numpy 1.21 @@ -52,7 +61,10 @@ requirements: - scikit-image >=0.19.0,<0.21.0a0 - scipy run: - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - cuda-version {{ cuda_spec }} + {% if cuda_major == "11" %} + - cudatoolkit + {% endif %} - {{ pin_compatible('numpy') }} - click - cupy >=12.0.0 @@ -64,7 +76,7 @@ requirements: tests: requirements: - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} imports: - cucim diff --git a/conda/recipes/libcucim/conda_build_config.yaml b/conda/recipes/libcucim/conda_build_config.yaml index 6c2368ed8..80cb9b2d0 100644 --- a/conda/recipes/libcucim/conda_build_config.yaml +++ b/conda/recipes/libcucim/conda_build_config.yaml @@ -4,8 +4,24 @@ c_compiler_version: cxx_compiler_version: - 11 +cuda_compiler: + - cuda-nvcc + +cuda11_compiler: + - nvcc + sysroot_version: - "2.17" libwebp_base_version: - "<1.3a0" + +# The CTK libraries below are missing from the conda-forge::cudatoolkit package +# for CUDA 11. The "*_host_*" version specifiers correspond to `11.8` packages +# and the "*_run_*" version specifiers correspond to `11.x` packages. + +cuda11_libcufile_host_version: + - "1.4.0.31" + +cuda11_libcufile_run_version: + - ">=1.0.0.82,<=1.4.0.31" diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 11486062d..56126fe08 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -39,6 +39,12 @@ requirements: build: - {{ compiler("c") }} - {{ compiler("cxx") }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} ={{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} + {% endif %} + - cuda-version ={{ cuda_version }} - binutils - cmake >=3.23.1,!=3.25.0 - make @@ -46,15 +52,32 @@ requirements: - sysroot_{{ target_platform }} {{ sysroot_version }} - yasm # [x86_64] host: - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} + {% if cuda_major == "11" %} + - cudatoolkit + - libcufile {{ cuda11_libcufile_host_version }} # [linux64] + - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] + {% else %} + - libcufile-dev # [linux64] + - libnvjpeg-dev # [linux64] + {% endif %} - jbig - libwebp-base {{ libwebp_base_version }} # [linux or osx] + - nvtx-c >=3.1.0 - openslide - xz - zlib - zstd run: - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - cuda-version {{ cuda_spec }} + {% if cuda_major == "11" %} + - cudatoolkit + - libcufile {{ cuda11_libcufile_run_version }} # [linux64] + {% else %} + - cuda-nvrtc + - libcufile # [linux64] + - libnvjpeg # [linux64] + {% endif %} - {{ pin_compatible('libwebp-base', max_pin='x.x') }} - jbig # - openslide # skipping here but benchmark binary would need openslide library From 03acaa937fe30096214c43c0fddb72a3845b4fa1 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 27 Jun 2023 18:19:12 -0700 Subject: [PATCH 05/39] Fix `minor_version` in `cucim` recipe --- conda/recipes/cucim/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 714cb0bfd..fb3a43e91 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, NVIDIA CORPORATION. {% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[2] %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} {% set py_version = environ['CONDA_PY'] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} From f2fda0218b6a66b833261e11820d0e2241c4ee52 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 27 Jun 2023 20:47:56 -0700 Subject: [PATCH 06/39] Drop extra blank line --- conda/environments/all_cuda-120_arch-x86_64.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index ec81e9189..04130d4ec 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -48,4 +48,3 @@ dependencies: - pip: - opencv-python-headless>=4.6 name: all_cuda-120_arch-x86_64 - From c0f9dce339207d0b8592782ad4e4a43c67c486ca Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 27 Jun 2023 22:27:05 -0700 Subject: [PATCH 07/39] Add CUDA 12 to `dependencies.yaml` --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index f4f62f017..830017101 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -3,7 +3,7 @@ files: all: output: conda matrix: - cuda: ["11.8"] + cuda: ["11.8", "12.0"] arch: [x86_64] includes: - build From 811f370cb872d0073dd8601b174dc82c89b6627c Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 27 Jun 2023 22:32:11 -0700 Subject: [PATCH 08/39] Refresh envs --- conda/environments/all_cuda-120_arch-x86_64.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 04130d4ec..3d7ac35c2 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -1,5 +1,5 @@ # This file is generated by `rapids-dependency-file-generator`. -# To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. +# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. channels: - rapidsai - rapidsai-nightly From 586d32381a7446bc0658382f35b3ef720afced49 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 28 Jun 2023 14:14:28 -0700 Subject: [PATCH 09/39] Add `cuda_spec` to `meta.yaml`'s Jinja vars --- conda/recipes/cucim/meta.yaml | 2 ++ conda/recipes/libcucim/meta.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index fb3a43e91..8e027e1da 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -5,8 +5,10 @@ {% set py_version = environ['CONDA_PY'] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} +{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 {% set date_string = environ['RAPIDS_DATE_STRING'] %} + package: name: cucim version: {{ version }} diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 56126fe08..8e88054fc 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -4,8 +4,10 @@ {% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} +{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 {% set date_string = environ['RAPIDS_DATE_STRING'] %} + package: name: libcucim version: {{ version }} From a4778b4502af83b7399cf523d3a67ffb7c5f24eb Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 28 Jun 2023 15:35:15 -0700 Subject: [PATCH 10/39] Use `pin_compatible` with `cuda-version` --- conda/recipes/cucim/meta.yaml | 2 +- conda/recipes/libcucim/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 8e027e1da..aa3270528 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -63,7 +63,7 @@ requirements: - scikit-image >=0.19.0,<0.21.0a0 - scipy run: - - cuda-version {{ cuda_spec }} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} {% if cuda_major == "11" %} - cudatoolkit {% endif %} diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 8e88054fc..f424c44c2 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -71,7 +71,7 @@ requirements: - zlib - zstd run: - - cuda-version {{ cuda_spec }} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} {% if cuda_major == "11" %} - cudatoolkit - libcufile {{ cuda11_libcufile_run_version }} # [linux64] From b250b1de71ea28568eb27944dd46e4d60e0300dc Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 28 Jun 2023 15:35:17 -0700 Subject: [PATCH 11/39] Use `cuda-version` --- .../all_cuda-118_arch-x86_64.yaml | 3 ++- .../all_cuda-120_arch-x86_64.yaml | 9 ++++--- dependencies.yaml | 27 ++++++++++++------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 4b06f29aa..929c7c036 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -10,7 +10,8 @@ dependencies: - c-compiler - click - cmake>=3.23.1,!=3.25.0 -- cudatoolkit=11.8 +- cuda-version=11.8 +- cudatoolkit - cupy >=12.0.0 - cxx-compiler - gcc_linux-64=11.* diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 3d7ac35c2..94fe6a54e 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -10,16 +10,17 @@ dependencies: - c-compiler - click - cmake>=3.23.1,!=3.25.0 -- cuda-cudart-dev=12.0 -- cuda-nvcc_linux-64=12.0 +- cuda-cudart-dev +- cuda-nvcc_linux-64 +- cuda-version=12.0 - cupy >=12.0.0 - cxx-compiler - gcc_linux-64=11.* - imagecodecs>=2021.6.8 - ipython - jbig -- libcufile-dev=1.5 -- libnvjpeg-dev=12.0 +- libcufile-dev +- libnvjpeg-dev - libwebp-base - nbsphinx - ninja diff --git a/dependencies.yaml b/dependencies.yaml index 830017101..276cc7cad 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -66,22 +66,26 @@ dependencies: arch: x86_64 cuda: "11.8" packages: + - cuda-version=11.8 - nvcc_linux-64=11.8 - matrix: arch: aarch64 cuda: "11.8" packages: + - cuda-version=11.8 - nvcc_linux-aarch64=11.8 - matrix: arch: x86_64 cuda: "12.0" packages: - - cuda-nvcc_linux-64=12.0 + - cuda-version=12.0 + - cuda-nvcc_linux-64 - matrix: arch: aarch64 cuda: "12.0" packages: - - cuda-nvcc_linux-aarch64=12.0 + - cuda-version=12.0 + - cuda-nvcc_linux-aarch64 checks: common: - output_types: [conda, requirements] @@ -94,25 +98,30 @@ dependencies: - matrix: cuda: "11.2" packages: - - cudatoolkit=11.2 + - cuda-version=11.2 + - cudatoolkit - matrix: cuda: "11.4" packages: - - cudatoolkit=11.4 + - cuda-version=11.4 + - cudatoolkit - matrix: cuda: "11.5" packages: - - cudatoolkit=11.5 + - cuda-version=11.5 + - cudatoolkit - matrix: cuda: "11.8" packages: - - cudatoolkit=11.8 + - cuda-version=11.8 + - cudatoolkit - matrix: cuda: "12.0" packages: - - cuda-cudart-dev=12.0 - - libnvjpeg-dev=12.0 - - libcufile-dev=1.5 + - cuda-version=12.0 + - cuda-cudart-dev + - libnvjpeg-dev + - libcufile-dev docs: common: - output_types: [conda, requirements] From cedc1b89003997601f8d222114604158c17e41e2 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 28 Jun 2023 15:35:18 -0700 Subject: [PATCH 12/39] Use `cuda-nvcc` (instead of specifying arch) --- conda/environments/all_cuda-120_arch-x86_64.yaml | 2 +- dependencies.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 94fe6a54e..d215eab33 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -11,7 +11,7 @@ dependencies: - click - cmake>=3.23.1,!=3.25.0 - cuda-cudart-dev -- cuda-nvcc_linux-64 +- cuda-nvcc - cuda-version=12.0 - cupy >=12.0.0 - cxx-compiler diff --git a/dependencies.yaml b/dependencies.yaml index 276cc7cad..f5789cec3 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -79,13 +79,13 @@ dependencies: cuda: "12.0" packages: - cuda-version=12.0 - - cuda-nvcc_linux-64 + - cuda-nvcc - matrix: arch: aarch64 cuda: "12.0" packages: - cuda-version=12.0 - - cuda-nvcc_linux-aarch64 + - cuda-nvcc checks: common: - output_types: [conda, requirements] From 4fb96ad6d0857ebb739f6592a6fa49d2ab59d234 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Jun 2023 12:54:39 -0700 Subject: [PATCH 13/39] Fix missing GHA branch in workflow Co-authored-by: Bradley Dice --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1bf63c618..01c96fa74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,7 +38,7 @@ jobs: if: github.ref_type == 'branch' needs: [python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@ + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120 with: arch: "amd64" branch: ${{ inputs.branch }} From 7a10826ae5bac0f08d6968688b370c4303452a71 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Jun 2023 12:56:56 -0700 Subject: [PATCH 14/39] Drop unused Jinja variables Co-authored-by: Bradley Dice --- conda/recipes/cucim/meta.yaml | 2 -- conda/recipes/libcucim/meta.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index aa3270528..5dfb604aa 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -1,11 +1,9 @@ # Copyright (c) 2021-2023, NVIDIA CORPORATION. {% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} {% set py_version = environ['CONDA_PY'] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} -{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 {% set date_string = environ['RAPIDS_DATE_STRING'] %} diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index f424c44c2..56f5cf405 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -1,10 +1,8 @@ # Copyright (c) 2021-2023, NVIDIA CORPORATION. {% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} -{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 {% set date_string = environ['RAPIDS_DATE_STRING'] %} From 1559ae5932522ff0794ef3d3ae850460d127568a Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Jun 2023 12:57:37 -0700 Subject: [PATCH 15/39] Combine archs in `dependencies.yaml` Co-authored-by: Bradley Dice --- dependencies.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index f5789cec3..9675031bc 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -75,13 +75,6 @@ dependencies: - cuda-version=11.8 - nvcc_linux-aarch64=11.8 - matrix: - arch: x86_64 - cuda: "12.0" - packages: - - cuda-version=12.0 - - cuda-nvcc - - matrix: - arch: aarch64 cuda: "12.0" packages: - cuda-version=12.0 From c90230ddf1888ff8a48744d1138e294f300d252c Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Jun 2023 13:29:30 -0700 Subject: [PATCH 16/39] Drop redundant `cudatoolkit`s from `host` As `cudatoolkit` already is pulled in by `{{ compiler('cuda11') }}`. There is no need to list it explicitly. So go ahead and drop it. Co-authored-by: Bradley Dice --- conda/recipes/cucim/meta.yaml | 3 --- conda/recipes/libcucim/meta.yaml | 1 - 2 files changed, 4 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 5dfb604aa..9eb5e1be5 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -51,9 +51,6 @@ requirements: host: - click - cuda-version ={{ cuda_version }} - {% if cuda_major == "11" %} - - cudatoolkit - {% endif %} - cupy >=12.0.0 - libcucim ={{ version }} - numpy 1.21 diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 56f5cf405..1cb2bda78 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -54,7 +54,6 @@ requirements: host: - cuda-version ={{ cuda_version }} {% if cuda_major == "11" %} - - cudatoolkit - libcufile {{ cuda11_libcufile_host_version }} # [linux64] - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] {% else %} From bcd525521e653742af184b4b44dc47cc26a1f761 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 12 Jul 2023 20:41:30 -0700 Subject: [PATCH 17/39] Require `libnvjpeg-static` As the builds for wheels and conda packages are currently statically linking `libnvjpeg`, continue with this for now to ensure the dependency is used. --- conda/recipes/libcucim/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 1cb2bda78..ef5da48ff 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -57,8 +57,9 @@ requirements: - libcufile {{ cuda11_libcufile_host_version }} # [linux64] - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] {% else %} - - libcufile-dev # [linux64] - - libnvjpeg-dev # [linux64] + - libcufile-dev # [linux64] + - libnvjpeg-dev # [linux64] + - libnvjpeg-static # [linux64] {% endif %} - jbig - libwebp-base {{ libwebp_base_version }} # [linux or osx] @@ -75,7 +76,6 @@ requirements: {% else %} - cuda-nvrtc - libcufile # [linux64] - - libnvjpeg # [linux64] {% endif %} - {{ pin_compatible('libwebp-base', max_pin='x.x') }} - jbig From 646b3690b9910b3cae0d7b146578bb1ab9c63176 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 12 Jul 2023 22:46:11 -0700 Subject: [PATCH 18/39] Requre `libnvjpeg` for CUDA 11 --- conda/recipes/libcucim/conda_build_config.yaml | 3 +++ conda/recipes/libcucim/meta.yaml | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conda/recipes/libcucim/conda_build_config.yaml b/conda/recipes/libcucim/conda_build_config.yaml index 80cb9b2d0..4f3ea2a0b 100644 --- a/conda/recipes/libcucim/conda_build_config.yaml +++ b/conda/recipes/libcucim/conda_build_config.yaml @@ -25,3 +25,6 @@ cuda11_libcufile_host_version: cuda11_libcufile_run_version: - ">=1.0.0.82,<=1.4.0.31" + +cuda11_libnvjpeg_host_version: + - "11.6.0.55" diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index ef5da48ff..8294a61f1 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -54,8 +54,9 @@ requirements: host: - cuda-version ={{ cuda_version }} {% if cuda_major == "11" %} - - libcufile {{ cuda11_libcufile_host_version }} # [linux64] - - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] + - libcufile {{ cuda11_libcufile_host_version }} # [linux64] + - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] + - libnvjpeg-dev {{ cuda11_libnvjpeg_host_version }} # [linux64] {% else %} - libcufile-dev # [linux64] - libnvjpeg-dev # [linux64] From d96d41bce38a00ad96d35651060c593f9f67a443 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 12 Jul 2023 22:56:23 -0700 Subject: [PATCH 19/39] Search Conda paths for dependencies --- run | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/run b/run index 35a2e6674..1ddb3f1fd 100755 --- a/run +++ b/run @@ -432,7 +432,15 @@ build_local() { copy_gds_files_() { local root_folder=${1:-${TOP}} - local cufile_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" #"/usr/local/cuda/include:/usr/local/cuda/lib64 ${PREFIX:-}/include:${PREFIX:-}/lib ${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" + local cufile_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" + if [[ ! -z "${CONDA_PREFIX+x}" ]] + then + cufile_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${cufile_search}" + fi + if [[ ! -z "${PREFIX+x}" ]] + then + cufile_search="${PREFIX:-}/include:${PREFIX:-}/lib ${cufile_search}" + fi local gds_version=1.0.0 local candidate local cufile_include @@ -486,6 +494,14 @@ copy_nvjpeg_files_() { local root_folder=${1:-${TOP}} local arch_name="$(get_arch_name_)" local nvjpeg_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" + if [[ ! -z "${CONDA_PREFIX+x}" ]] + then + nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${nvjpeg_search}" + fi + if [[ ! -z "${PREFIX+x}" ]] + then + nvjpeg_search="${PREFIX:-}/include:${PREFIX:-}/lib ${nvjpeg_search}" + fi local cuda_version="11.6" local nvjpeg_version="11-6_11.6.0.55-1" local candidate From 46236929e802c21247fa2f4c4b912a6bbfaacccb Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 12 Jul 2023 23:05:38 -0700 Subject: [PATCH 20/39] Add `libnvjpeg` to `host` This gets pulled in by `libnvjpeg-dev`, but isn't properly version constrained. So make sure that it is by requiring it explicitly with the intended version. --- conda/recipes/libcucim/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 8294a61f1..3a69488bd 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -56,6 +56,7 @@ requirements: {% if cuda_major == "11" %} - libcufile {{ cuda11_libcufile_host_version }} # [linux64] - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] + - libnvjpeg {{ cuda11_libnvjpeg_host_version }} # [linux64] - libnvjpeg-dev {{ cuda11_libnvjpeg_host_version }} # [linux64] {% else %} - libcufile-dev # [linux64] From 60db8b1422d79b4088fd5188f6cc71d83eaeb5de Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 14 Jul 2023 13:17:20 -0700 Subject: [PATCH 21/39] Use `sqrt` in `_get_manders_overlap_coeff` --- python/cucim/src/cucim/skimage/measure/_colocalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cucim/src/cucim/skimage/measure/_colocalization.py b/python/cucim/src/cucim/skimage/measure/_colocalization.py index f79c43a44..7f771ec0e 100644 --- a/python/cucim/src/cucim/skimage/measure/_colocalization.py +++ b/python/cucim/src/cucim/skimage/measure/_colocalization.py @@ -178,7 +178,7 @@ def manders_coloc_coeff(image0, image1_mask, mask=None): @cp.fuse() def _get_manders_overlap_coeff(image0, image1): - denom = (cp.sum(cp.square(image0)) * (cp.sum(cp.square(image1)))) ** 0.5 + denom = cp.sqrt(cp.sum(cp.square(image0)) * (cp.sum(cp.square(image1)))) return cp.sum(cp.multiply(image0, image1)) / denom From 331a058212aefd19dba538fe1e79256ce40beb66 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 14 Jul 2023 14:29:14 -0700 Subject: [PATCH 22/39] Use `norm` on images --- python/cucim/src/cucim/skimage/measure/_colocalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cucim/src/cucim/skimage/measure/_colocalization.py b/python/cucim/src/cucim/skimage/measure/_colocalization.py index 7f771ec0e..8f1efae68 100644 --- a/python/cucim/src/cucim/skimage/measure/_colocalization.py +++ b/python/cucim/src/cucim/skimage/measure/_colocalization.py @@ -178,7 +178,7 @@ def manders_coloc_coeff(image0, image1_mask, mask=None): @cp.fuse() def _get_manders_overlap_coeff(image0, image1): - denom = cp.sqrt(cp.sum(cp.square(image0)) * (cp.sum(cp.square(image1)))) + denom = cp.linalg.norm(image0) * cp.linalg.norm(image1) return cp.sum(cp.multiply(image0, image1)) / denom From 154835cc969d1bef66e79fa82a5d2477621cb937 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 14 Jul 2023 15:02:08 -0700 Subject: [PATCH 23/39] Use `vdot` with images --- python/cucim/src/cucim/skimage/measure/_colocalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cucim/src/cucim/skimage/measure/_colocalization.py b/python/cucim/src/cucim/skimage/measure/_colocalization.py index 8f1efae68..77920abac 100644 --- a/python/cucim/src/cucim/skimage/measure/_colocalization.py +++ b/python/cucim/src/cucim/skimage/measure/_colocalization.py @@ -179,7 +179,7 @@ def manders_coloc_coeff(image0, image1_mask, mask=None): @cp.fuse() def _get_manders_overlap_coeff(image0, image1): denom = cp.linalg.norm(image0) * cp.linalg.norm(image1) - return cp.sum(cp.multiply(image0, image1)) / denom + return cp.vdot(image0, image1) / denom def manders_overlap_coeff(image0, image1, mask=None): From b2614043966a491c748b6a6d7fe3a463d6633dd8 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 14 Jul 2023 15:03:50 -0700 Subject: [PATCH 24/39] Drop `fuse` from `_get_manders_overlap_coeff` --- python/cucim/src/cucim/skimage/measure/_colocalization.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/cucim/src/cucim/skimage/measure/_colocalization.py b/python/cucim/src/cucim/skimage/measure/_colocalization.py index 77920abac..fda558136 100644 --- a/python/cucim/src/cucim/skimage/measure/_colocalization.py +++ b/python/cucim/src/cucim/skimage/measure/_colocalization.py @@ -176,7 +176,6 @@ def manders_coloc_coeff(image0, image1_mask, mask=None): return cp.sum(image0 * image1_mask) / img_sum -@cp.fuse() def _get_manders_overlap_coeff(image0, image1): denom = cp.linalg.norm(image0) * cp.linalg.norm(image1) return cp.vdot(image0, image1) / denom From 3c40509f45fe86ed4ecc9dcf8d0ce1084976905e Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 14 Jul 2023 15:05:05 -0700 Subject: [PATCH 25/39] Inline `_get_manders_overlap_coeff` --- python/cucim/src/cucim/skimage/measure/_colocalization.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python/cucim/src/cucim/skimage/measure/_colocalization.py b/python/cucim/src/cucim/skimage/measure/_colocalization.py index fda558136..3587a331b 100644 --- a/python/cucim/src/cucim/skimage/measure/_colocalization.py +++ b/python/cucim/src/cucim/skimage/measure/_colocalization.py @@ -176,11 +176,6 @@ def manders_coloc_coeff(image0, image1_mask, mask=None): return cp.sum(image0 * image1_mask) / img_sum -def _get_manders_overlap_coeff(image0, image1): - denom = cp.linalg.norm(image0) * cp.linalg.norm(image1) - return cp.vdot(image0, image1) / denom - - def manders_overlap_coeff(image0, image1, mask=None): r"""Manders' overlap coefficient @@ -260,7 +255,8 @@ def manders_overlap_coeff(image0, image1, mask=None): if image1.min() < 0: raise ValueError("image1 contains negative values") - return _get_manders_overlap_coeff(image0, image1) + denom = cp.linalg.norm(image0) * cp.linalg.norm(image1) + return cp.vdot(image0, image1) / denom def intersection_coeff(image0_mask, image1_mask, mask=None): From 47901492daba195dfe1a740697236b1c8f818b07 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 17 Jul 2023 12:03:24 -0700 Subject: [PATCH 26/39] Use `libnvjpeg*` on `aarch64` too --- conda/recipes/libcucim/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 3a69488bd..e80b17c8c 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -56,12 +56,12 @@ requirements: {% if cuda_major == "11" %} - libcufile {{ cuda11_libcufile_host_version }} # [linux64] - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] - - libnvjpeg {{ cuda11_libnvjpeg_host_version }} # [linux64] - - libnvjpeg-dev {{ cuda11_libnvjpeg_host_version }} # [linux64] + - libnvjpeg {{ cuda11_libnvjpeg_host_version }} + - libnvjpeg-dev {{ cuda11_libnvjpeg_host_version }} {% else %} - libcufile-dev # [linux64] - - libnvjpeg-dev # [linux64] - - libnvjpeg-static # [linux64] + - libnvjpeg-dev + - libnvjpeg-static {% endif %} - jbig - libwebp-base {{ libwebp_base_version }} # [linux or osx] From f5ddb741fffa18edb83c1348e0105aff88c0b954 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 17 Jul 2023 18:33:39 -0700 Subject: [PATCH 27/39] Refresh CUDA 12 environment Update `scikit-image` requirement from `branch-23.08`. --- conda/environments/all_cuda-120_arch-x86_64.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index d215eab33..053087440 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -37,7 +37,7 @@ dependencies: - pytest>=6.2.4 - python>=3.8,<3.11 - recommonmark -- scikit-image >=0.19.0,<0.21.0a0 +- scikit-image >=0.19.0,<0.22.0a0 - scipy - sphinx<6 - sysroot_linux-64==2.17 From 59406a81b19991c11e2d3608476d51d6ccca3e25 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 17 Jul 2023 18:44:58 -0700 Subject: [PATCH 28/39] Add `libcufile*` & `libnvjpeg*` to dependencies --- conda/environments/all_cuda-118_arch-x86_64.yaml | 4 ++++ dependencies.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index bc86ab342..ffde5c912 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -18,6 +18,10 @@ dependencies: - imagecodecs>=2021.6.8 - ipython - jbig +- libcufile-dev=1.4.0.31 +- libcufile=1.4.0.31 +- libnvjpeg-dev=11.6.0.55 +- libnvjpeg=11.6.0.55 - libwebp-base - nbsphinx - ninja diff --git a/dependencies.yaml b/dependencies.yaml index be2ce51ca..d493335ec 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -68,17 +68,25 @@ dependencies: packages: - cuda-version=11.8 - nvcc_linux-64=11.8 + - libcufile=1.4.0.31 + - libcufile-dev=1.4.0.31 + - libnvjpeg=11.6.0.55 + - libnvjpeg-dev=11.6.0.55 - matrix: arch: aarch64 cuda: "11.8" packages: - cuda-version=11.8 - nvcc_linux-aarch64=11.8 + - libnvjpeg=11.6.0.55 + - libnvjpeg-dev=11.6.0.55 - matrix: cuda: "12.0" packages: - cuda-version=12.0 - cuda-nvcc + - libcufile-dev + - libnvjpeg-dev checks: common: - output_types: [conda, requirements] From e7e1aa9f8bded16742f868cb9d3a13a6eec94e80 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 17 Jul 2023 18:55:49 -0700 Subject: [PATCH 29/39] Add `libnvjpeg-static` to CUDA 12 dependencies --- conda/environments/all_cuda-120_arch-x86_64.yaml | 1 + dependencies.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 053087440..ae0339e39 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -21,6 +21,7 @@ dependencies: - jbig - libcufile-dev - libnvjpeg-dev +- libnvjpeg-static - libwebp-base - nbsphinx - ninja diff --git a/dependencies.yaml b/dependencies.yaml index d493335ec..54a355aad 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -87,6 +87,7 @@ dependencies: - cuda-nvcc - libcufile-dev - libnvjpeg-dev + - libnvjpeg-static checks: common: - output_types: [conda, requirements] From 2ce1425157a20f5306af11007c863bb3ee432c63 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 10:55:37 -0700 Subject: [PATCH 30/39] Suport CUDA 12 CTK packages' `targets/` dir --- run | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/run b/run index 1ddb3f1fd..93785e8eb 100755 --- a/run +++ b/run @@ -433,13 +433,25 @@ build_local() { copy_gds_files_() { local root_folder=${1:-${TOP}} local cufile_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" + local targets_dir="" + if [[ "$(uname -m)" == "x86-64" ]] + then + targets_dir="targets/x86_64-linux" + elif [[ "$(uname -m)" == "aarch64" ]] + then + targets_dir="targets/sbsa-linux" + else + echo "Unknown architecture" + exit 1 + fi + targets_dir="targets/${targets_dir}" if [[ ! -z "${CONDA_PREFIX+x}" ]] then - cufile_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${cufile_search}" + cufile_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${cufile_search}" fi if [[ ! -z "${PREFIX+x}" ]] then - cufile_search="${PREFIX:-}/include:${PREFIX:-}/lib ${cufile_search}" + cufile_search="${PREFIX:-}/include:${PREFIX:-}/lib ${PREFIX:-}/${targets_dir}/include:${PREFIX:-}/${targets_dir}/lib ${cufile_search}" fi local gds_version=1.0.0 local candidate @@ -494,13 +506,25 @@ copy_nvjpeg_files_() { local root_folder=${1:-${TOP}} local arch_name="$(get_arch_name_)" local nvjpeg_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" + local targets_dir="" + if [[ "$(uname -m)" == "x86-64" ]] + then + targets_dir="targets/x86_64-linux" + elif [[ "$(uname -m)" == "aarch64" ]] + then + targets_dir="targets/sbsa-linux" + else + echo "Unknown architecture" + exit 1 + fi + targets_dir="targets/${targets_dir}" if [[ ! -z "${CONDA_PREFIX+x}" ]] then - nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${nvjpeg_search}" + nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${cufile_search}" fi if [[ ! -z "${PREFIX+x}" ]] then - nvjpeg_search="${PREFIX:-}/include:${PREFIX:-}/lib ${nvjpeg_search}" + nvjpeg_search="${PREFIX:-}/include:${PREFIX:-}/lib ${PREFIX:-}/${targets_dir}/include:${PREFIX:-}/${targets_dir}/lib ${cufile_search}" fi local cuda_version="11.6" local nvjpeg_version="11-6_11.6.0.55-1" From a7bea93cb42db7b356b9f965845ca916885ba1a3 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 11:15:38 -0700 Subject: [PATCH 31/39] Revert to using `branch-23.08` GHA workflows As `branch-23.08` now contains CUDA 12 support, switch back to using that GHA in the cuCIM PR. --- .github/workflows/build.yaml | 8 ++++---- .github/workflows/pr.yaml | 12 ++++++------ .github/workflows/test.yaml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 01c96fa74..f4349bb89 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -38,7 +38,7 @@ jobs: if: github.ref_type == 'branch' needs: [python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -51,7 +51,7 @@ jobs: python-build: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -60,7 +60,7 @@ jobs: upload-conda: needs: [cpp-build, python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 11ff7a276..150debb86 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,32 +18,32 @@ jobs: - conda-python-tests - docs-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.08 checks: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.08 conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 with: build_type: pull-request docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 with: build_type: pull-request node_type: "gpu-v100-latest-1" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c4ad5f462..39b8ac83b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-python-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 with: build_type: nightly branch: ${{ inputs.branch }} From 3fdcd906ddd787ae25437e7867158ad992363b69 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 12:55:13 -0700 Subject: [PATCH 32/39] Fix typo in `x86_64` --- run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run b/run index 93785e8eb..36e161e01 100755 --- a/run +++ b/run @@ -434,7 +434,7 @@ copy_gds_files_() { local root_folder=${1:-${TOP}} local cufile_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" local targets_dir="" - if [[ "$(uname -m)" == "x86-64" ]] + if [[ "$(uname -m)" == "x86_64" ]] then targets_dir="targets/x86_64-linux" elif [[ "$(uname -m)" == "aarch64" ]] @@ -507,7 +507,7 @@ copy_nvjpeg_files_() { local arch_name="$(get_arch_name_)" local nvjpeg_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" local targets_dir="" - if [[ "$(uname -m)" == "x86-64" ]] + if [[ "$(uname -m)" == "x86_64" ]] then targets_dir="targets/x86_64-linux" elif [[ "$(uname -m)" == "aarch64" ]] From 220de6ed9d69b96834b84fbea16641599616c850 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 12:56:30 -0700 Subject: [PATCH 33/39] Fix `nvjpeg_search` typos --- run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run b/run index 36e161e01..85aecf8eb 100755 --- a/run +++ b/run @@ -520,11 +520,11 @@ copy_nvjpeg_files_() { targets_dir="targets/${targets_dir}" if [[ ! -z "${CONDA_PREFIX+x}" ]] then - nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${cufile_search}" + nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${nvjpeg_search}" fi if [[ ! -z "${PREFIX+x}" ]] then - nvjpeg_search="${PREFIX:-}/include:${PREFIX:-}/lib ${PREFIX:-}/${targets_dir}/include:${PREFIX:-}/${targets_dir}/lib ${cufile_search}" + nvjpeg_search="${PREFIX:-}/include:${PREFIX:-}/lib ${PREFIX:-}/${targets_dir}/include:${PREFIX:-}/${targets_dir}/lib ${nvjpeg_search}" fi local cuda_version="11.6" local nvjpeg_version="11-6_11.6.0.55-1" From 3336a0e88d82f01f1006c5fde71fbf6f0e6e10de Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 13:11:03 -0700 Subject: [PATCH 34/39] Drop duplicate `targets` directory nesting --- run | 2 -- 1 file changed, 2 deletions(-) diff --git a/run b/run index 85aecf8eb..12454c060 100755 --- a/run +++ b/run @@ -444,7 +444,6 @@ copy_gds_files_() { echo "Unknown architecture" exit 1 fi - targets_dir="targets/${targets_dir}" if [[ ! -z "${CONDA_PREFIX+x}" ]] then cufile_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${cufile_search}" @@ -517,7 +516,6 @@ copy_nvjpeg_files_() { echo "Unknown architecture" exit 1 fi - targets_dir="targets/${targets_dir}" if [[ ! -z "${CONDA_PREFIX+x}" ]] then nvjpeg_search="${CONDA_PREFIX:-}/include:${CONDA_PREFIX:-}/lib ${CONDA_PREFIX:-}/${targets_dir}/include:${CONDA_PREFIX:-}/${targets_dir}/lib ${nvjpeg_search}" From 6d79d60f141cd4f67bdb6d2b4df02ad38986a7d4 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 13:12:00 -0700 Subject: [PATCH 35/39] Drop unneeded `CUDA` `echo` line This is unset & unused as best we can tell. So drop this `echo` line. --- conda/recipes/libcucim/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/conda/recipes/libcucim/build.sh b/conda/recipes/libcucim/build.sh index 7d21aebe3..d9da2e18d 100644 --- a/conda/recipes/libcucim/build.sh +++ b/conda/recipes/libcucim/build.sh @@ -4,7 +4,6 @@ CUCIM_BUILD_TYPE=${CUCIM_BUILD_TYPE:-release} echo "CC : ${CC}" echo "CXX : ${CXX}" -echo "CUDA : ${CUDA}" # CUDA needs to include $PREFIX/include as system include path export CUDAFLAGS="-isystem $BUILD_PREFIX/include -isystem $PREFIX/include " From 4b601e3c218bdf3e3de1f1d602d558c2ac4b37a2 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 14:28:02 -0700 Subject: [PATCH 36/39] Use `arch` instead of `uname -m` Co-authored-by: Vyas Ramasubramani --- run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run b/run index 12454c060..7f8ac5188 100755 --- a/run +++ b/run @@ -434,10 +434,10 @@ copy_gds_files_() { local root_folder=${1:-${TOP}} local cufile_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" local targets_dir="" - if [[ "$(uname -m)" == "x86_64" ]] + if [[ "$(arch)" == "x86_64" ]] then targets_dir="targets/x86_64-linux" - elif [[ "$(uname -m)" == "aarch64" ]] + elif [[ "$(arch)" == "aarch64" ]] then targets_dir="targets/sbsa-linux" else @@ -506,10 +506,10 @@ copy_nvjpeg_files_() { local arch_name="$(get_arch_name_)" local nvjpeg_search="${root_folder}/temp/cuda/include:${root_folder}/temp/cuda/lib64" local targets_dir="" - if [[ "$(uname -m)" == "x86_64" ]] + if [[ "$(arch)" == "x86_64" ]] then targets_dir="targets/x86_64-linux" - elif [[ "$(uname -m)" == "aarch64" ]] + elif [[ "$(arch)" == "aarch64" ]] then targets_dir="targets/sbsa-linux" else From 229af54e820f344aa5f5cdc4768f53123fb66cee Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 14:31:34 -0700 Subject: [PATCH 37/39] Drop extra `cudatoolkit` dependency from `cucim` --- conda/recipes/cucim/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index a68e6b0bf..653e1bc6d 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -59,9 +59,6 @@ requirements: - scipy run: - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - {% if cuda_major == "11" %} - - cudatoolkit - {% endif %} - {{ pin_compatible('numpy') }} - click - cupy >=12.0.0 From 78dfa5507502cf2eacfb572f23aa24545a75f08b Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 14:43:52 -0700 Subject: [PATCH 38/39] Drop unneeded `cuda-nvrtc` dependency cuCIM only uses `cuda-nvrtc` through Python indirectly via CuPy. So this usage of `cuda-nvrtc` shouldn't be needed. So drop it. --- conda/recipes/libcucim/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index a71178ad0..a46c652fe 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -76,7 +76,6 @@ requirements: - cudatoolkit - libcufile {{ cuda11_libcufile_run_version }} # [linux64] {% else %} - - cuda-nvrtc - libcufile # [linux64] {% endif %} - {{ pin_compatible('libwebp-base', max_pin='x.x') }} From e2b8fe4fce25eb300c256eea0b14f3eb0fbc6485 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 25 Jul 2023 14:45:13 -0700 Subject: [PATCH 39/39] Drop `libcufile` from `run` as well This should already be added via `libcufile-dev` in `host`. --- conda/recipes/libcucim/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index a46c652fe..c372f822b 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -75,8 +75,6 @@ requirements: {% if cuda_major == "11" %} - cudatoolkit - libcufile {{ cuda11_libcufile_run_version }} # [linux64] - {% else %} - - libcufile # [linux64] {% endif %} - {{ pin_compatible('libwebp-base', max_pin='x.x') }} - jbig