Skip to content

Small Compatibility Fix for CUDA 12.8. #165

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

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

Schmiedium
Copy link
Contributor

The latest version of CUDA ships libnvvm with version 2.0, which fails the check for an appropriate version number. This commit fixes this so that 2.0 correctly passes the minimum version number check.

#163 Referencing this issue, this PR should provide a fix for that when using CUDA 12.8

The latest version of CUDA ships libnvvm with version 2.0, which fails the check for an appopriate version number. This commit fixes this so that 2.0 correctly passes the minimum version number check.
Copy link
Contributor

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

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

I don't think this is right, 1.5 will incorrectly continue / not take the error path. (5 < 6) && (1 < 1) -> (true && false) -> false

@LegNeato
Copy link
Contributor

You probably want something like:

    if major <= 1 && minor < 6

@LegNeato
Copy link
Contributor

As mentioned in #100, we are unsure of what the implications here are. I'd be inclined to enable and deal with the fallout though.

@Schmiedium
Copy link
Contributor Author

You're right, I messed up the logic there. Thank you for catching that!

I did some digging and found here nvvm version 2.0 is supposed to be a breaking change. I have CUDA 12.8 installed though, and don't see any issues with the examples we have built.

Everything seems to compile just the same and run fine. If you're okay with the fallout from trying to support newer versions, then I think it would be a good thing to do. I think people trying to use the project in the future will install the newest version of CUDA available, and if this prevents that it could be a headache.

@LegNeato
Copy link
Contributor

Right, if you look at #100 I pasted that link in 👍 . It doesn't look the libnvvm API was breaking, and I don't think there is any case where we generate multiple versions concurrently so it is probably fine.

Copy link
Contributor

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

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

Thanks!!! 🚀

@LegNeato LegNeato merged commit 400f816 into Rust-GPU:main Mar 17, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants