Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libcurand recipe #21916

Merged
merged 36 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5ace05e
initial commit for adding curand
mmccarty Jan 31, 2023
7f08d92
additions from 12.0.0 branch
mmccarty Jan 31, 2023
a4cbd51
reverted version
mmccarty Jan 31, 2023
85a8b63
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
ef70cce
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
816dfca
dropped post-link.sh
mmccarty Jan 31, 2023
896e4b7
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
7f44855
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
b2f5103
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
3310a72
Update recipes/libcurand/meta.yaml
mmccarty Jan 31, 2023
ab58e81
Use `libcurand-static` in `libcurand-dev`
jakirkham Jan 31, 2023
6c7dd3a
Add selector for `build` too
jakirkham Jan 31, 2023
3c6cfc2
Fix indentation
jakirkham Jan 31, 2023
f244ca3
Fix another indentation issue
jakirkham Jan 31, 2023
09a9e32
Update recipes/libcurand/meta.yaml
mmccarty Feb 10, 2023
a079b1a
Update recipes/libcurand/meta.yaml
mmccarty Feb 10, 2023
3f172cc
Merge branch 'main' into create-libcurand
mmccarty Feb 10, 2023
fa559c8
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
0e09f49
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
26ed4a7
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
e181c0b
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
999a102
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
179e692
Update recipes/libcurand/meta.yaml
mmccarty Mar 22, 2023
14e73b8
Merge branch 'main' into create-libcurand
jakirkham Mar 27, 2023
77a4424
Update build.sh
vyasr Apr 10, 2023
7cbd56d
Add arm support in variant
vyasr Apr 10, 2023
8326a6a
Update meta.yaml
vyasr Apr 10, 2023
91af938
Address some PR comments
vyasr Apr 10, 2023
eaf3421
Merge pull request #1 from vyasr/create-libcurand
vyasr Apr 11, 2023
16e6982
Fix tabs
vyasr Apr 11, 2023
17f7b66
Address PR comments
vyasr Apr 11, 2023
0e53867
Fix test for static lib
vyasr Apr 11, 2023
bc951aa
Address PR comments
vyasr Apr 11, 2023
9b9153a
Update recipes/libcurand/meta.yaml
vyasr Apr 11, 2023
72c8131
Fix curand tests.
bdice Apr 11, 2023
3322e14
Merge pull request #2 from bdice/fix-curand-tests
vyasr Apr 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions recipes/libcurand/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if not exist %PREFIX% mkdir %PREFIX%

move lib\x64\* %LIBRARY_LIB%
move bin\* %LIBRARY_BIN%
move include\* %LIBRARY_INC%
32 changes: 32 additions & 0 deletions recipes/libcurand/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 lib
mmccarty marked this conversation as resolved.
Show resolved Hide resolved
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
2 changes: 2 additions & 0 deletions recipes/libcurand/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
arm_variant_type: # [aarch64]
- sbsa # [aarch64]
155 changes: 155 additions & 0 deletions recipes/libcurand/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{% set name = "libcurand" %}
{% set version = "10.3.1.50" %}
mmccarty marked this conversation as resolved.
Show resolved Hide resolved
{% 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
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
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:
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
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
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
build:
skip: True # [not linux]
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
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:
mmccarty marked this conversation as resolved.
Show resolved Hide resolved
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