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

Adding cuda-compat recipe #21952

merged 8 commits into from
Jun 23, 2023

Conversation

adibbley
Copy link
Contributor

@adibbley adibbley commented Feb 3, 2023

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@adibbley adibbley mentioned this pull request Feb 3, 2023
49 tasks
@adibbley
Copy link
Contributor Author

adibbley commented Feb 3, 2023

Here is the recipe for cuda-compat
cc @jakirkham @kkraus14

@jakirkham
Copy link
Member

@kkraus14, did you have particular thoughts on how this would be used? Should it be a dependency of cuda-nvcc? Would cuda-nvcc need particular flags to make use of this? Anything else we'd like to do with it?

@kkraus14
Copy link
Contributor

kkraus14 commented Mar 9, 2023

I imagine this would get used similarly to how people use the cuda-compat package today.

From the docs https://docs.nvidia.com/deploy/cuda-compatibility/#forward-compatibility-title:

  • It seems like it's only officially supported on a subset of GPUs,

Forward Compatibility is applicable only for systems with NVIDIA Data Center GPUs or select NGC Server Ready SKUs of RTX cards.

  • Users are encouraged to explicitly set LD_LIBRARY_PATH to opt into using it

I don't think we want to encourage anything explicitly depending on this package given the subset of supported GPUs.

As a starting point, I'd propose we package this similarly to how the current recipe does, not in the default linker search path, which allows a user to set something like LD_LIBRARY_PATH themselves. In the future, we could explore using activation scripts to automatically set things if we find there's desired default behaviors.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/cuda-compat) and found it was in an excellent condition.

@adibbley adibbley marked this pull request as ready for review March 9, 2023 18:10
@jakirkham
Copy link
Member

Guess the only other question is whether we add a cuda-version dependency on this package ( conda-forge/cuda-version-feedstock#1 )

@bdice
Copy link
Contributor

bdice commented Mar 14, 2023

Guess the only other question is whether we add a cuda-version dependency on this package ( conda-forge/cuda-version-feedstock#1 )

I think this is an exception and does not need a cuda-version dependency. It appears to be versioned according to the driver rather than the toolkit:

{% set version = "525.60.13" %}

However, we might need an explicit run_constrained: __cuda>=12 pinning on this recipe, if that would normally come from the cuda-version.

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
Copy link
Contributor

Choose a reason for hiding this comment

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

#21952 (comment)
We might need CUDA 12 drivers for this package to be useful.

Suggested change
- {{ compiler("cxx") }}
- {{ compiler("cxx") }}
run_constrained:
- __cuda >=12

Copy link
Member

Choose a reason for hiding this comment

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

Do we need a more specific pinning for driver version? Or is a lower bound like this sufficient?

Copy link
Contributor

Choose a reason for hiding this comment

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

We might need a lower and upper bound on __cuda?

Suggested change
- {{ compiler("cxx") }}
- {{ compiler("cxx") }}
run_constrained:
- __cuda >=12,<13

@kkraus14
Copy link
Contributor

I think this is an exception and does not need a cuda-version dependency. It appears to be versioned according to the driver rather than the toolkit:

{% set version = "525.60.13" %}

However, we might need an explicit run_constrained: __cuda>=12 pinning on this recipe, if that would normally come from the cuda-version.

If using apt, I can do apt install cuda-compat-12-0 to get the cuda-compat package for CUDA 12.0. With this versioning scheme there's no easy way for someone to say "Give me the cuda-compat package aligned with CUDA 12.0".

Maybe we could split into cuda-compat and cuda-compat-impl type packages or something? Where impl is versioned based on the driver version, i.e. 525.60.13 and cuda-compat is versioned according to the CUDA version, i.e. 12.0?

@adibbley
Copy link
Contributor Author

If using apt, I can do apt install cuda-compat-12-0 to get the cuda-compat package for CUDA 12.0. With this versioning scheme there's no easy way for someone to say "Give me the cuda-compat package aligned with CUDA 12.0".

Maybe we could split into cuda-compat and cuda-compat-impl type packages or something? Where impl is versioned based on the driver version, i.e. 525.60.13 and cuda-compat is versioned according to the CUDA version, i.e. 12.0?

We could add the CUDA version to the package name as we do with .debs to match this functionality. The tradeoff is ease of upgrades, but I'm not sure users of this package would want that anyway.

@jakirkham
Copy link
Member

Interesting would be tempted to use cuda-version for this kind of behavior. This seems inline with general cuda-version usage as discussed in issue ( conda-forge/cuda-version-feedstock#1 ). Though maybe I'm missing something

@kkraus14
Copy link
Contributor

Would you ever want a newer cuda-compat package with an older set of cuda runtime libraries? I.E. get the cuda-compat for CUDA 12.2 with cuBLAS and cuRAND 12.0?

That feels like a legitimate and reasonable use case that wouldn't work with the cuda-version package.

@bdice
Copy link
Contributor

bdice commented Mar 21, 2023

Yes, @kkraus14's example is exactly what I had in mind. I also don't really want to bake the version into the package name. I liked Keith's other suggestion of splitting into a cuda-compat and cuda-compat-impl for double-versioning. Or perhaps a build string would be enough to select the CUDA version "by name" without needing proper version logic (comparators, etc.).

@jakirkham
Copy link
Member

What about cuda-compat-version?

@kkraus14
Copy link
Contributor

kkraus14 commented Apr 7, 2023

What about cuda-compat-version?

That doesn't solve the issue if the main package uses cuda-version as a run dependency.

recipes/cuda-compat/build.sh Show resolved Hide resolved
recipes/cuda-compat/meta.yaml Outdated Show resolved Hide resolved
recipes/cuda-compat/meta.yaml Outdated Show resolved Hide resolved
recipes/cuda-compat/meta.yaml Outdated Show resolved Hide resolved
adibbley and others added 2 commits June 21, 2023 14:31
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@jakirkham jakirkham requested a review from bdice June 21, 2023 19:19
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I missed fixing one instance of TESLA earlier. Also a versioning question.

recipes/cuda-compat/meta.yaml Outdated 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.

adibbley and others added 2 commits June 21, 2023 16:07
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@jakirkham jakirkham requested a review from bdice June 21, 2023 22:22
@jakirkham jakirkham merged commit d9c104c into conda-forge:main Jun 23, 2023
@jakirkham
Copy link
Member

Thanks all! 🙏

Let's get this in. We can follow up on anything else in the feedstock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants