Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# What ❔ This PR improves the detection of the CUDA toolkit under Linux, and the detection of its version under all OSes. ## Why ❔ Under Linux, the CUDA detection is hardcoded to look into `/usr/local/cuda`, which is not guaranteed to be the default installation folder. The new method first looks for the `CUDA_PATH` env. var., then default to `/usr/local/cuda` if it is empty. The current way of finding out the installed CUDA version is to look for a `version.json` file in the CUDA installation path. This file is not guaranteed to exist. However, `nvcc` **is** guaranteed to be installed with the toolkit; so the new method is to parse its output to find the exact version there. ## Checklist - [X] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [X] Tests for the changes have been added / updated. - [X] Documentation comments have been added / updated. - [X] Code has been formatted via `zk fmt` and `zk lint`.
- Loading branch information