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 cccl recipe (rename from cuda-cccl-impl). #23722

Merged
merged 8 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 12 additions & 0 deletions recipes/cccl/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if not exist %PREFIX% mkdir %PREFIX%
mkdir %LIBRARY_LIB%\cmake
mkdir %LIBRARY_INC%

move thrust\thrust\cmake %LIBRARY_LIB%\cmake\thrust
move cub\cub\cmake %LIBRARY_LIB%\cmake\cub
move libcudacxx\lib\cmake\libcudacxx %LIBRARY_LIB%\cmake

move thrust\thrust %LIBRARY_INC%
move cub\cub %LIBRARY_INC%
move libcudacxx\include\cuda %LIBRARY_INC%
move libcudacxx\include\nv %LIBRARY_INC%
13 changes: 13 additions & 0 deletions recipes/cccl/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

mkdir -p ${PREFIX}/lib/cmake
mkdir -p ${PREFIX}/include

mv -v thrust/thrust/cmake ${PREFIX}/lib/cmake/thrust
mv -v cub/cub/cmake ${PREFIX}/lib/cmake/cub
cp -rv libcudacxx/lib/cmake/libcudacxx ${PREFIX}/lib/cmake

cp -rv thrust/thrust ${PREFIX}/include
cp -rv cub/cub ${PREFIX}/include
cp -rv libcudacxx/include/cuda ${PREFIX}/include
cp -rv libcudacxx/include/nv ${PREFIX}/include
Comment on lines +6 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if there is a CMake install approach we can use here in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be reworked with CCCL 2.2 which releases from the new monorepo. Let’s keep the status quo for now since this is just renaming a package we have already tested/used a bit and trust.

73 changes: 73 additions & 0 deletions recipes/cccl/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{% set name = "cccl" %}
{% set version = "2.0.1" %}
{% set thrust_version = "2.0.1" %}
{% set cub_version = "2.0.1" %}
{% set libcudacxx_version = "1.9.0" %}
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "linux-sbsa" %} # [aarch64]
{% set platform = "windows-x86_64" %} # [win]
{% set extension = "tar.gz" %} # [not win]
{% set extension = "zip" %} # [win]

# CUDA C++ Core Libraries (CCCL) includes thrust, cub, and libcudacxx. These are header-only libraries.
# The cccl package ships CCCL headers in the environment's include directory for use in downstream recipes that require CCCL. It follows CCCL upstream versioning. Use this package to say, "I want a specific version of CCCL headers when building my package (which may be newer than the versions shipped in the latest CUDA Toolkit)."
# The cuda-cccl_{{ target_platform }} package (e.g. cuda-cccl_linux-64) ships CCCL headers in 'targets/.../include' that can be used by nvcc, the CUDA compiler. It follows CUDA Toolkit versioning. This package should only be a dependency of the cuda-cudart / cuda-nvcc packages that require CCCL to function. It is target-specific to allow for cross-compilation, as a dependency of cuda-nvcc.
# The cuda-cccl package is a metapackage that depends on cccl and cuda-cccl_{{ target_platform }} to ensure that versions are consistent. Use this package to say, "I want to build with the thrust headers that shipped with CUDA Toolkit X.Y" by adding dependencies on `cuda-cccl` and `cuda-version X.Y`.

package:
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://github.com/NVIDIA/thrust/archive/refs/tags/{{ thrust_version }}.{{ extension }}
folder: thrust
sha256: 06df373cf487cf3710be6798bc5441a03685b78e5c1338e2f14005f7ccd030e6 # [linux]
sha256: 39a9fc88b0b06da118cc3ed28cbfca27b2a7ae192877996cab1295176ceed65e # [win]
- url: https://github.com/NVIDIA/cub/archive/refs/tags/{{ cub_version }}.{{ extension }}
folder: cub
sha256: beeef0962c87eca994db06cb9e9168a71c63fb369398a5b5f1db923140814701 # [linux]
sha256: 22308facf62421d6dd2489b9554ffa4908dca13d3921a3e7f2965c5a6984cd20 # [win]
- url: https://github.com/NVIDIA/libcudacxx/archive/refs/tags/{{ libcudacxx_version }}.{{ extension }}
folder: libcudacxx
sha256: 05b1435ad65f5bdef1bb8d1eb29dc8f0f7df34c01d77bf8686687a4603588bce # [linux]
sha256: d7864460ce8def8e0620cb9dd891e94299ade75eac75aa96b34001af3cdb074c # [win]

build:
number: 0
skip: true # [osx]

bdice marked this conversation as resolved.
Show resolved Hide resolved
test:
commands:
- test -d $PREFIX/lib/cmake/thrust # [linux]
- test -d $PREFIX/lib/cmake/cub # [linux]
- test -d $PREFIX/lib/cmake/libcudacxx # [linux]
- test -d $PREFIX/include/thrust # [linux]
- test -d $PREFIX/include/cub # [linux]
- test -d $PREFIX/include/cuda # [linux]
- test -d $PREFIX/include/nv # [linux]
- if not exist %LIBRARY_LIB%\cmake\thrust exit 1 # [win]
- if not exist %LIBRARY_LIB%\cmake\cub exit 1 # [win]
- if not exist %LIBRARY_LIB%\cmake\libcudacxx exit 1 # [win]
- if not exist %LIBRARY_INC%\thrust exit 1 # [win]
- if not exist %LIBRARY_INC%\cub exit 1 # [win]
- if not exist %LIBRARY_INC%\cuda exit 1 # [win]
- if not exist %LIBRARY_INC%\nv exit 1 # [win]

about:
home: https://developer.nvidia.com/cuda-toolkit
license_file:
- cub/LICENSE.TXT
- thrust/LICENSE
- libcudacxx/LICENSE.TXT
license: BSD-3-Clause AND Apache-2.0
bdice marked this conversation as resolved.
Show resolved Hide resolved
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: 'CUDA C++ Core Libraries'
description: |
CUDA C++ Core Libraries
bdice marked this conversation as resolved.
Show resolved Hide resolved
doc_url: https://docs.nvidia.com/cuda/index.html

extra:
recipe-maintainers:
- adibbley
- bdice
bdice marked this conversation as resolved.
Show resolved Hide resolved