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

Switch to using nvcc --list-gpu-code for build.rs compute_cap #619

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

quietlychris
Copy link
Contributor

This is a notional change for build.rs for addressing what still seems to be a build issue relating to #553 (as dfdx is not currently compiling on main for me), switching to using the nvcc list of acceptable GPU codes instead.

My nvcc --version info is

Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

and nvidia-smi info of

NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0

with the hardware the same as in the original issue.

I'm more than happy to add in changes that might make this compatible with other development environments, in case this doesn't work with other people's.

@coreylowman
Copy link
Owner

Huh weird, thanks for opening this. Can you post the output of the two commands? I'm curious what's different between them.

$ nvidia-smi --query-gpu=compute_cap --format=csv
$ nvcc --list-gpu-code

@quietlychris
Copy link
Contributor Author

Sure thing--the results are below

$ nvidia-smi --query-gpu=compute_cap --format=csv
compute_cap
8.9

and

$ nvcc --list-gpu-code
sm_35
sm_37
sm_50
sm_52
sm_53
sm_60
sm_61
sm_62
sm_70
sm_72
sm_75
sm_80
sm_86
sm_87

@coreylowman
Copy link
Owner

Interesting I'm surprised they are different. Thanks for this fix then!

@coreylowman coreylowman merged commit 67f4884 into coreylowman:main Mar 27, 2023
@coreylowman
Copy link
Owner

Hm Actually this one doesn't work for me -

nvidia-smi --query-gpu=compute_cap --format=csv
compute_cap
8.6
nvcc --list-gpu-code
sm_35
sm_37
sm_50
sm_52
sm_53
sm_60
sm_61
sm_62
sm_70
sm_72
sm_75
sm_80
sm_86
sm_87

Note that 87 is listed in nvcc but not in nvidia-smi, so all the tests fail for me since it says invalid PTX

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