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

Support NixOS / add path fallback logic via which nvcc #92

Open
ralfbiedert opened this issue Oct 24, 2022 · 0 comments
Open

Support NixOS / add path fallback logic via which nvcc #92

ralfbiedert opened this issue Oct 24, 2022 · 0 comments

Comments

@ralfbiedert
Copy link

Right now the crate find_cuda_helper() has a few hard-coded paths it checks on Linux (e.g., /opt/cuda or /usr/local/cuda).

On NixOS however the CUDA toolkit gets installed to a location like /nix/store/n3mnxpif0zxs4ws1pw8spj68l0gzcr9z-cudatoolkit-11.7.0, including libs and includes, and all bin commands are made available in the current PATH.

So to compile CUDA crates on NixOS there should be a fallback in find_cuda_lib_dirs() that, for example, searches for the presence of nvcc (e.g., by running which nvcc) and uses its parent as the return value of that method. (Note, not saying this is the best solution for NixOS, please chime in if you know something better).

@ralfbiedert ralfbiedert changed the title Support NixOS Support NixOS / add path fallback logic via which nvcc Oct 24, 2022
ralfbiedert added a commit to ralfbiedert/Rust-CUDA that referenced this issue Oct 25, 2022
ralfbiedert added a commit to ralfbiedert/Rust-CUDA that referenced this issue Oct 25, 2022
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

1 participant