diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 554fa9416..ffde5c912 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -10,13 +10,18 @@ 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.* - 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/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..ae0339e39 --- /dev/null +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -0,0 +1,52 @@ +# 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 +- cuda-nvcc +- cuda-version=12.0 +- cupy >=12.0.0 +- cxx-compiler +- gcc_linux-64=11.* +- imagecodecs>=2021.6.8 +- ipython +- jbig +- libcufile-dev +- libnvjpeg-dev +- libnvjpeg-static +- 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.22.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 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 3947862b8..653e1bc6d 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -1,12 +1,12 @@ # 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 py_version = environ['CONDA_PY'] %} {% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} {% set date_string = environ['RAPIDS_DATE_STRING'] %} + package: name: cucim version: {{ version }} @@ -38,13 +38,19 @@ 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 }} - cupy >=12.0.0 - libcucim ={{ version }} - numpy 1.21 @@ -52,7 +58,7 @@ requirements: - scikit-image >=0.19.0,<0.22.0a0 - scipy run: - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - {{ pin_compatible('numpy') }} - click - cupy >=12.0.0 @@ -64,7 +70,7 @@ requirements: tests: requirements: - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} imports: - cucim 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 " diff --git a/conda/recipes/libcucim/conda_build_config.yaml b/conda/recipes/libcucim/conda_build_config.yaml index 6c2368ed8..4f3ea2a0b 100644 --- a/conda/recipes/libcucim/conda_build_config.yaml +++ b/conda/recipes/libcucim/conda_build_config.yaml @@ -4,8 +4,27 @@ 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" + +cuda11_libnvjpeg_host_version: + - "11.6.0.55" diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 3e610efb6..c372f822b 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -1,11 +1,11 @@ # 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 date_string = environ['RAPIDS_DATE_STRING'] %} + package: name: libcucim version: {{ version }} @@ -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,30 @@ requirements: - sysroot_{{ target_platform }} {{ sysroot_version }} - yasm # [x86_64] host: - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} + {% if cuda_major == "11" %} + - libcufile {{ cuda11_libcufile_host_version }} # [linux64] + - libcufile-dev {{ cuda11_libcufile_host_version }} # [linux64] + - libnvjpeg {{ cuda11_libnvjpeg_host_version }} + - libnvjpeg-dev {{ cuda11_libnvjpeg_host_version }} + {% else %} + - libcufile-dev # [linux64] + - libnvjpeg-dev + - libnvjpeg-static + {% endif %} - jbig - libwebp-base {{ libwebp_base_version }} + - nvtx-c >=3.1.0 - openslide - xz - zlib - zstd run: - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} + {% if cuda_major == "11" %} + - cudatoolkit + - libcufile {{ cuda11_libcufile_run_version }} # [linux64] + {% endif %} - {{ pin_compatible('libwebp-base', max_pin='x.x') }} - jbig # - openslide # skipping here but benchmark binary would need openslide library diff --git a/dependencies.yaml b/dependencies.yaml index c2c429532..54a355aad 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 @@ -66,12 +66,28 @@ dependencies: arch: x86_64 cuda: "11.8" 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 + - libnvjpeg-static checks: common: - output_types: [conda, requirements] @@ -84,19 +100,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-version=12.0 + - cuda-cudart-dev + - libnvjpeg-dev + - libcufile-dev docs: common: - output_types: [conda, requirements] diff --git a/run b/run index 35a2e6674..7f8ac5188 100755 --- a/run +++ b/run @@ -432,7 +432,26 @@ 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" + local targets_dir="" + if [[ "$(arch)" == "x86_64" ]] + then + targets_dir="targets/x86_64-linux" + elif [[ "$(arch)" == "aarch64" ]] + then + targets_dir="targets/sbsa-linux" + else + echo "Unknown architecture" + exit 1 + fi + 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}" + fi + if [[ ! -z "${PREFIX+x}" ]] + then + 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 local cufile_include @@ -486,6 +505,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 [[ "$(arch)" == "x86_64" ]] + then + targets_dir="targets/x86_64-linux" + elif [[ "$(arch)" == "aarch64" ]] + then + targets_dir="targets/sbsa-linux" + else + echo "Unknown architecture" + exit 1 + fi + 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}" + fi + if [[ ! -z "${PREFIX+x}" ]] + then + 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" local candidate