diff --git a/recipes/libcurand/build.sh b/recipes/libcurand/build.sh index 88d88e1c61295..d561597fa365b 100644 --- a/recipes/libcurand/build.sh +++ b/recipes/libcurand/build.sh @@ -2,6 +2,9 @@ # Install to conda style directories [[ -d lib64 ]] && mv lib64 lib +mkdir -p ${PREFIX}/lib +[[ -d pkg-config ]] && mv pkg-config ${PREFIX}/lib/pkgconfig +[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/curand*.pc [[ ${target_platform} == "linux-64" ]] && targetsDir="targets/x86_64-linux" [[ ${target_platform} == "linux-ppc64le" ]] && targetsDir="targets/ppc64le-linux" @@ -15,10 +18,15 @@ for i in `ls`; do mkdir -p ${PREFIX}/${targetsDir} mkdir -p ${PREFIX}/$i cp -rv $i ${PREFIX}/${targetsDir} - for j in `ls $i`; do - ln -s ../${targetsDir}/$i/$j ${PREFIX}/$i/$j - done + if [[ $i == "lib" ]]; then + for j in "$i"/*.so*; do + # Shared libraries are symlinked in $PREFIX/lib + ln -s ${PREFIX}/${targetsDir}/$j ${PREFIX}/$j + done + fi else - cp -rv $i ${PREFIX} + # Put all other files in targetsDir + mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} + cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} fi done diff --git a/recipes/libcurand/conda_build_config.yaml b/recipes/libcurand/conda_build_config.yaml new file mode 100644 index 0000000000000..52229a8424e52 --- /dev/null +++ b/recipes/libcurand/conda_build_config.yaml @@ -0,0 +1,2 @@ +arm_variant_type: # [aarch64] + - sbsa # [aarch64] diff --git a/recipes/libcurand/meta.yaml b/recipes/libcurand/meta.yaml index 2e19ac6202be5..c12e53c507a3d 100644 --- a/recipes/libcurand/meta.yaml +++ b/recipes/libcurand/meta.yaml @@ -5,6 +5,10 @@ {% set platform = "linux-ppc64le" %} # [ppc64le] {% set platform = "linux-sbsa" %} # [aarch64] {% set platform = "windows-x86_64" %} # [win] +{% set target_name = "x86_64-linux" %} # [linux64] +{% set target_name = "ppc64le-linux" %} # [ppc64le] +{% set target_name = "sbsa-linux" %} # [aarch64] +{% set target_name = "x64" %} # [win] {% set extension = "tar.xz" %} # [not win] {% set extension = "zip" %} # [win] @@ -23,79 +27,113 @@ build: number: 0 skip: true # [osx] -requirements: - build: - - {{ compiler("c") }} - - {{ compiler("cxx") }} - - sysroot_{{ target_platform }} 2.17 # [linux] - outputs: - name: libcurand files: - - lib/libcurand.so.* # [linux] - - targets/*/lib/libcurand.so.* # [linux] - - Library\bin\curand*.dll # [win] + - lib/libcurand.so.* # [linux] + - targets/{{ target_name }}/lib/libcurand.so.* # [linux] + - Library\bin\curand*.dll # [win] requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - arm-variant * {{ arm_variant_type }} # [aarch64] + - sysroot_{{ target_platform }} 2.17 # [linux] host: - cuda-version {{ cuda_version }} run: - {{ pin_compatible("cuda-version", max_pin="x.x") }} + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] test: commands: - - test -f $PREFIX/lib/libcurand.so.{{ version }} # [linux] - - if not exist %LIBRARY_BIN%\curand64_{{ version.split(".")[0] }}.dll exit 1 # [win] + - test -L $PREFIX/lib/libcurand.so.{{ version }} # [linux] + - test -L $PREFIX/lib/libcurand.so.{{ version.split(".")[0] }} # [linux] + - test -f $PREFIX/targets/{{ target_name }}/lib/libcurand.so.{{ version }} # [linux] + - test -L $PREFIX/targets/{{ target_name }}/lib/libcurand.so.{{ version.split(".")[0] }} # [linux] + - if not exist %LIBRARY_BIN%\curand64_{{ version.split(".")[0] }}.dll exit 1 # [win] + about: + home: https://developer.nvidia.com/curand + license: LicenseRef-NVIDIA-End-User-License-Agreement + license_file: LICENSE + license_url: https://docs.nvidia.com/cuda/eula/index.html + summary: CURAND native runtime libraries + description: | + CURAND native runtime libraries + doc_url: https://docs.nvidia.com/cuda/curand/ - name: libcurand-dev + build: + run_exports: + - {{ pin_subpackage("libcurand", max_pin="x") }} + files: + - lib/libcurand.so # [linux] + - lib/pkgconfig # [linux] + - targets/{{ target_name }}/include # [linux] + - targets/{{ target_name }}/lib/libcurand.so # [linux] + - targets/{{ target_name }}/lib/stubs # [linux] + - targets/{{ target_name }}/libcurand/src # [linux and not aarch64] + - Library\include # [win] + - Library\lib # [win] requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - arm-variant * {{ arm_variant_type }} # [aarch64] + - sysroot_{{ target_platform }} 2.17 # [linux] host: - cuda-version {{ cuda_version }} run: - {{ pin_compatible("cuda-version", max_pin="x.x") }} - - libcurand >={{ version }} + - {{ pin_subpackage("libcurand", exact=True) }} run_constrained: - - libcurand-static >={{ version }} - files: - - lib/libcurand.so # [linux] - - targets/*/lib/libcurand.so # [linux] - - lib/stubs/libcurand.so* # [linux] - - targets/*/lib/stubs/libcurand.so* # [linux] - - include/curand* # [linux] - - targets/*/include/curand* # [linux] - - Library\include # [win] - - Library\lib # [win] + - arm-variant * {{ arm_variant_type }} # [aarch64] + - libcublas-static >={{ version }} # [linux] test: commands: - test -f $PREFIX/include/curand.h # [linux] - if not exist %LIBRARY_INC%\curand.h exit 1 # [win] - if not exist %LIBRARY_LIB%\curand.lib exit 1 # [win] + about: + home: https://developer.nvidia.com/curand + license: LicenseRef-NVIDIA-End-User-License-Agreement + license_file: LICENSE + license_url: https://docs.nvidia.com/cuda/eula/index.html + summary: CURAND native runtime libraries + description: | + CURAND native runtime libraries + doc_url: https://docs.nvidia.com/cuda/curand/ - name: libcurand-static - build: # [not linux] + build: skip: True # [not linux] files: - - lib/libcurand_static.a - - targets/*/lib/libcurand_static.a + - targets/{{ target_name }}/lib/libcurand_static.a requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - arm-variant * {{ arm_variant_type }} # [aarch64] + - sysroot_{{ target_platform }} 2.17 # [linux] host: - cuda-version {{ cuda_version }} run: - {{ pin_compatible("cuda-version", max_pin="x.x") }} - - libcurand >={{ version }} run_constrained: - - libcurand-static >={{ version }} + - arm-variant * {{ arm_variant_type }} # [aarch64] test: commands: - test -f $PREFIX/lib/libcurand_static.a about: - home: https://developer.nvidia.com/cuda-toolkit + home: https://developer.nvidia.com/curand license_file: LICENSE license: LicenseRef-NVIDIA-End-User-License-Agreement license_url: https://docs.nvidia.com/cuda/eula/index.html summary: CURAND native runtime libraries description: | CURAND native runtime libraries - doc_url: https://docs.nvidia.com/cuda/index.html + doc_url: https://docs.nvidia.com/cuda/curand/ extra: recipe-maintainers: