Skip to content

Commit

Permalink
Consolidate CUDA version setting to one place
Browse files Browse the repository at this point in the history
Instead of having the CUDA version hard-coded in a bunch of places,
consolidate it to one file and have everything else load and use that
file.
  • Loading branch information
jakirkham committed Aug 3, 2024
1 parent dd57399 commit abf92bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
11 changes: 7 additions & 4 deletions ci/install_latest_cuda_toolkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ if [ "${OS_ID}" != "rocky" ]; then
exit 1
fi

export CUDA_VERSION="$(cat pynvjitlink/CUDA_VERSION)"
export YUM_CUDA_VERSION="${CUDA_VERSION//./-}"

yum install -y \
cuda-nvcc-12-5 \
cuda-cudart-devel-12-5 \
cuda-driver-devel-12-5 \
libnvjitlink-devel-12-5
cuda-nvcc-$YUM_CUDA_VERSION \
cuda-cudart-devel-$YUM_CUDA_VERSION \
cuda-driver-devel-$YUM_CUDA_VERSION \
libnvjitlink-devel-$YUM_CUDA_VERSION
3 changes: 0 additions & 3 deletions conda/recipes/pynvjitlink/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ c_stdlib_version:

cuda_compiler:
- cuda-nvcc

cuda_compiler_version:
- 12.5
8 changes: 6 additions & 2 deletions conda/recipes/pynvjitlink/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
load_file="pynvjitlink/VERSION",
regex_pattern="(?P<value>.*)"
)[0] %}
{% set cuda_version = load_file_regex(
load_file="pynvjitlink/CUDA_VERSION",
regex_pattern="(?P<value>.*)"
)[0] %}
{% set project_data = data["project"] %}
{% set project_urls = project_data["urls"] %}

Expand All @@ -26,14 +30,14 @@ requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- {{ compiler('cuda') }} {{ cuda_version }}
- {{ stdlib('c') }}
- cmake >=3.26.4,!=3.30.0
- ninja
host:
- libnvjitlink-dev
- libnvjitlink-static
- cuda-version {{ cuda_compiler_version }}
- cuda-version {{ cuda_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 abf92bc

Please sign in to comment.