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

Some fixes #1

Merged
merged 4 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 12 additions & 4 deletions recipes/libcurand/build.sh
vyasr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
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]
96 changes: 67 additions & 29 deletions recipes/libcurand/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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
vyasr marked this conversation as resolved.
Show resolved Hide resolved
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]
vyasr marked this conversation as resolved.
Show resolved Hide resolved
- 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]
vyasr marked this conversation as resolved.
Show resolved Hide resolved
- 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:
Expand Down