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

Adding cuda-compat recipe #21952

Merged
merged 8 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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: 16 additions & 0 deletions recipes/cuda-compat/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 lib
mkdir -p ${PREFIX}/cuda-compat

cp -v lib/libcuda.so.${DRV_VERSION} ${PREFIX}/cuda-compat
ln -sv libcuda.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libcuda.so.1
ln -sv libcuda.so.1 ${PREFIX}/cuda-compat/libcuda.so
cp -v lib/libnvidia-nvvm.so.${DRV_VERSION} ${PREFIX}/cuda-compat
ln -sv libnvidia-nvvm.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libnvidia-nvvm.so.4
adibbley marked this conversation as resolved.
Show resolved Hide resolved
ln -sv libnvidia-nvvm.so.4 ${PREFIX}/cuda-compat/libnvidia-nvvm.so
cp -v lib/libnvidia-ptxjitcompiler.so.${DRV_VERSION} ${PREFIX}/cuda-compat
ln -sv libnvidia-ptxjitcompiler.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libnvidia-ptxjitcompiler.so.1
cp -v lib/libcudadebugger.so.${DRV_VERSION} ${PREFIX}/cuda-compat
ln -sv libcudadebugger.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libcudadebugger.so.1
91 changes: 91 additions & 0 deletions recipes/cuda-compat/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{% set name = "cuda-compat" %}
{% set version = "525.60.13" %}
{% set cuda_version = "12.0" %}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "linux-sbsa" %} # [aarch64]
{% set extension = "tar.xz" %} # [not win]

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

source:
url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/{{ platform }}/nvidia_driver-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: a42691822f6e87060da5682a8e0662c86d1b20fbf31d12cb2969b819995e4138 # [linux64]
sha256: 4ad08f8431195580349f4984fae2d93697d2f5572837c1e7ae59c37feab291c8 # [ppc64le]
sha256: 1708ae3ba857559cbfc4e6c06267ed6126eff2c68fa5321a95906f50e984148c # [aarch64]

build:
number: 0
skip: true # [osx or win]
script_env:
- DRV_VERSION={{ version }}

outputs:
- name: cuda-compat
requirements:
run:
- {{ pin_subpackage("cuda-compat-impl", exact=True) }}
test:
commands:
- exit 0
about:
home: https://developer.nvidia.com/cuda-toolkit
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: CUDA Compatibility Platform
description: |
Package containing all the necessary CUDA driver files related to forward
compatibility. This compatibility enables newer CUDA runtimes to work with
older display drivers. Used for TESLA cards only.
adibbley marked this conversation as resolved.
Show resolved Hide resolved
doc_url: https://docs.nvidia.com/cuda/index.html

- name: cuda-compat-impl
version: {{ version }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Were we planning to have a "dual version" here, for both CTK and driver versions? I'm not seeing both version (driver) and cuda_version (CTK version) being used in the impl/non-impl packages. Maybe I'm missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both versions are being used, cuda-compat uses cuda_version here

And here are the artifacts:

    /home/conda/staged-recipes/build_artifacts/linux-64/cuda-compat-impl-525.60.13-h59595ed_0.conda \
    /home/conda/staged-recipes/build_artifacts/linux-64/cuda-compat-12.0.0-ha770c72_0.conda

Copy link
Member

Choose a reason for hiding this comment

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

Should we rename version to driver_version for clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, renamed it in the latest.

files:
- cuda-compat
requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
test:
commands:
- test -f $PREFIX/cuda-compat/libcuda.so.{{ version }}
- test -L $PREFIX/cuda-compat/libcuda.so.1
- test -L $PREFIX/cuda-compat/libcuda.so
- test -f $PREFIX/cuda-compat/libnvidia-nvvm.so.{{ version }}
- test -L $PREFIX/cuda-compat/libnvidia-nvvm.so.4
- test -L $PREFIX/cuda-compat/libnvidia-nvvm.so
- test -f $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.{{ version }}
- test -L $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.1
- test -f $PREFIX/cuda-compat/libcudadebugger.so.{{ version }}
- test -L $PREFIX/cuda-compat/libcudadebugger.so.1
about:
home: https://developer.nvidia.com/cuda-toolkit
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: CUDA Compatibility Platform
description: |
Package containing all the necessary CUDA driver files related to forward
compatibility. This compatibility enables newer CUDA runtimes to work with
older display drivers. Used for TESLA cards only.
adibbley marked this conversation as resolved.
Show resolved Hide resolved
doc_url: https://docs.nvidia.com/cuda/index.html

about:
home: https://developer.nvidia.com/cuda-toolkit
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: CUDA Compatibility Platform
description: |
Package containing all the necessary CUDA driver files related to forward
compatibility. This compatibility enables newer CUDA runtimes to work with
older display drivers. Used for TESLA cards only.
adibbley marked this conversation as resolved.
Show resolved Hide resolved
doc_url: https://docs.nvidia.com/cuda/index.html

extra:
recipe-maintainers:
- adibbley