cuda.pathfinder.get_cuda_path_or_home#
- cuda.pathfinder.get_cuda_path_or_home() str | None#
Get CUDA Toolkit path from environment variables.
Returns the value of CUDA_PATH or CUDA_HOME. If both are set and differ, CUDA_PATH takes precedence and a warning is issued.
The result is cached for the process lifetime. The first call determines the CUDA Toolkit path, and subsequent calls return the cached value.
- Returns:
Path to CUDA Toolkit, or None if neither variable is set or all are empty.
Warning
- UserWarning: If multiple CUDA environment variables are set but point to
different locations (only on the first call).