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

Check that nvcc can compile to compute cap in build.rs #683

Closed
coreylowman opened this issue Apr 9, 2023 · 3 comments
Closed

Check that nvcc can compile to compute cap in build.rs #683

coreylowman opened this issue Apr 9, 2023 · 3 comments

Comments

@coreylowman
Copy link
Owner

coreylowman commented Apr 9, 2023

Throw helpful error message if not

@quietlychris
Copy link
Contributor

I was just looking into this, actually (sorry that I've been offline with respect to the question you asked in #624, I haven't had a lot of spare capacity for open source recently).

Unfortunately, it looks like I'm unable to update nvcc in order to get that matching; I've double-checked that I'm using the latest drivers that are available through System76 packaging (see this and this). While I might be able to do a manual install, I'd like to avoid this if possible, and I think that it would be beneficial from a community perspective to support this type of system configuration; Pop!_OS is commonly used in the single-machine deep learning community due to System76's built-in CUDA management, and it's relatively common due to its popularity within the Linux gaming community, all of whom are potential users of dfdx.

I was thinking that maybe we could try a nested solution? Throw an error if the current check in build.rs doesn't work, which can then be caught and try to use the code I submitted in #619, before otherwise erroring out? I know it's not the most elegant solution, but I think it could cover quite a few potential set-ups.

@coreylowman
Copy link
Owner Author

Thanks for the update. I think nested would work well. Sounds like the logic would be:

  1. Grab compute_cap from nvidia-smi
  2. Grab available gpu codes from nvcc (using your code)
  3. If nvidia-smi compute_cap is higher than the highest gpu code from nvcc (your case), then choose the highest gpu code in nvcc
  4. Otherwise, nvidia-smi compute_cap should be present in nvcc gpu codes, and we can use that

The case that I had was nvidia-smi compute_cap was less than highest nvcc gpu code, so in the new logic we'd just choose nvidia-smi since it's present in nvcc gpu codes.

@coreylowman
Copy link
Owner Author

Thanks for the PR @quietlychris, works great on my end!

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

No branches or pull requests

2 participants