Skip to content

Commit

Permalink
Set CUDA version in one file (and use everywhere else) (#101)
Browse files Browse the repository at this point in the history
* Rewrite logic to move CUDA version to one file used everywhere
* Switch conda-build recipe from `sysroot` to `{{ stdlib('c') }}`

---------

Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
jakirkham and bdice authored Aug 12, 2024
1 parent b03b390 commit a2f23b7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
12 changes: 11 additions & 1 deletion ci/build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ rapids-print-env

rapids-logger "Begin py build"

rapids-conda-retry mambabuild conda/recipes/pynvjitlink
export CUDA_VERSION="$(cat pynvjitlink/CUDA_VERSION)"

cat > cuda_compiler_version.yaml << EOF
cuda_compiler_version:
- "${CUDA_VERSION}"
EOF

rapids-conda-retry build \
conda/recipes/pynvjitlink \
-m cuda_compiler_version.yaml \
;

rapids-upload-conda-to-s3 python
10 changes: 9 additions & 1 deletion ci/install_latest_cuda_toolkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ if [ "${OS_ID}" != "rocky" ]; then
exit 1
fi

yum install -y cuda-nvcc-12-5 cuda-cudart-devel-12-5 cuda-driver-devel-12-5 libnvjitlink-devel-12-5
export CUDA_VERSION="$(cat pynvjitlink/CUDA_VERSION)"
export YUM_CUDA_VERSION="${CUDA_VERSION//./-}"

yum install -y \
cuda-nvcc-$YUM_CUDA_VERSION \
cuda-cudart-devel-$YUM_CUDA_VERSION \
cuda-driver-devel-$YUM_CUDA_VERSION \
libnvjitlink-devel-$YUM_CUDA_VERSION \
;
9 changes: 6 additions & 3 deletions conda/recipes/pynvjitlink/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ c_compiler_version:
cxx_compiler_version:
- 11

c_stdlib:
- sysroot

c_stdlib_version:
- 2.17

cuda_compiler:
- cuda-nvcc

cuda_compiler_version:
- 12.5
4 changes: 2 additions & 2 deletions conda/recipes/pynvjitlink/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ requirements:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- {{ stdlib('c') }}
- cmake >=3.26.4,!=3.30.0
- ninja
- sysroot_{{ target_platform }} 2.17
host:
- cuda-version {{ cuda_compiler_version }}
- libnvjitlink-dev
- libnvjitlink-static
- cuda-version {{ cuda_compiler_version }}
- python
- pip
- rapids-build-backend >=0.3.0,<0.4.0dev0
Expand Down
1 change: 1 addition & 0 deletions pynvjitlink/CUDA_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.5

0 comments on commit a2f23b7

Please sign in to comment.