You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
ralfbiedert
changed the title
Support NixOS
Support NixOS / add path fallback logic via which nvccOct 24, 2022
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
, includinglibs
andincludes
, and allbin
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 ofnvcc
(e.g., by runningwhich 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).The text was updated successfully, but these errors were encountered: