diff --git a/recipes/libcurand/bld.bat b/recipes/libcurand/bld.bat new file mode 100644 index 0000000000000..57ba00afb97f9 --- /dev/null +++ b/recipes/libcurand/bld.bat @@ -0,0 +1,5 @@ +if not exist %PREFIX% mkdir %PREFIX% + +move lib\x64\* %LIBRARY_LIB% +move bin\* %LIBRARY_BIN% +move include\* %LIBRARY_INC% diff --git a/recipes/libcurand/build.sh b/recipes/libcurand/build.sh new file mode 100644 index 0000000000000..665ddc2399591 --- /dev/null +++ b/recipes/libcurand/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# 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" +[[ ${target_platform} == "linux-aarch64" ]] && targetsDir="targets/sbsa-linux" + +for i in `ls`; do + [[ $i == "build_env_setup.sh" ]] && continue + [[ $i == "conda_build.sh" ]] && continue + [[ $i == "metadata_conda_debug.yaml" ]] && continue + if [[ $i == "lib" ]] || [[ $i == "include" ]]; then + mkdir -p ${PREFIX}/${targetsDir} + mkdir -p ${PREFIX}/$i + cp -rv $i ${PREFIX}/${targetsDir} + 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 + # 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 new file mode 100644 index 0000000000000..057fee7877102 --- /dev/null +++ b/recipes/libcurand/meta.yaml @@ -0,0 +1,155 @@ +{% set name = "libcurand" %} +{% set version = "10.3.1.50" %} +{% set cuda_version = "12.0" %} +{% set platform = "linux-x86_64" %} # [linux64] +{% 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] + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://developer.download.nvidia.com/compute/cuda/redist/{{ name }}/{{ platform }}/{{ name }}-{{ platform }}-{{ version }}-archive.{{ extension }} + sha256: 7c25712016fdde96011c3370673d9007eddd7231261a9b47f36b213ceb964191 # [linux64] + sha256: ac020f6e88105927f96f58ca331d3cddba35b37376f4716e866155c4f56681dd # [ppc64le] + sha256: c7ae331dd6c9936a4e9746abdc222514bbda47a1e495e396b8244b918de377e2 # [aarch64] + sha256: 5fb95fbbd1c652e1e2a8c12c41d225117cab3f718c739f0d49d580c11b4a44f1 # [win] + +build: + number: 0 + skip: true # [osx] + +test: + commands: + - test -L $PREFIX/lib/libcurand.so.{{ version.split(".")[0] }} # [linux] + - test -L $PREFIX/lib/libcurand.so.{{ version }} # [linux] + - test -L $PREFIX/targets/{{ target_name }}/lib/libcurand.so.{{ version.split(".")[0] }} # [linux] + - test -f $PREFIX/targets/{{ target_name }}/lib/libcurand.so.{{ version }} # [linux] + - if not exist %LIBRARY_BIN%\curand64_{{ version.split(".")[0] }}.dll exit 1 # [win] + +outputs: + - name: libcurand + files: + # Include SONAME and full name libraries, but not the linker name. That + # goes in the -dev package. + - 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] + # Tests are defined at the top level, due to package/output name conflicts. + 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] + - 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") }} + - {{ pin_subpackage("libcurand", exact=True) }} + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] + - libcurand-static >={{ version }} # [linux] + test: + commands: + - test -L $PREFIX/lib/libcurand.so # [linux] + - test -f $PREFIX/targets/{{ target_name }}/include/curand.h # [linux] + - test -L $PREFIX/targets/{{ target_name }}/lib/libcurand.so # [linux] + - test -f $PREFIX/targets/{{ target_name }}/lib/stubs/libcurand.so # [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: + skip: True # [not linux] + files: + - 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") }} + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] + test: + commands: + - test -f $PREFIX/targets/{{ target_name }}/lib/libcurand_static.a + 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/ + +about: + 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/curand/ + +extra: + recipe-maintainers: + - adibbley