cuda-pathfinder 1.4.0 Release notes#
Released on TBD
Highlights#
Breaking Changes#
CUDA environment variable priority changed:
CUDA_PATHnow takes precedence overCUDA_HOMEwhen both are set. Previously,CUDA_HOMEhad higher priority. If both variables are set and point to different locations, a warning will be issued andCUDA_PATHwill be used. This change aligns with industry standards and NVIDIA’s recommended practices.Migration Guide:
If you rely on
CUDA_HOME, consider switching toCUDA_PATHIf you set both variables, ensure they point to the same CUDA Toolkit installation
If they differ intentionally, be aware that
CUDA_PATHwill now be usedThe canonical search order is defined in
cuda.pathfinder._utils.env_vars.CUDA_ENV_VARS_ORDERED
New Features#
Added centralized CUDA environment variable handling with
cuda.pathfinder._utils.env_vars.get_cuda_home_or_path(). This function provides:Consistent behavior across all cuda-python packages (cuda.pathfinder, cuda.core, cuda.bindings)
Intelligent path comparison that handles symlinks, case sensitivity, and trailing slashes
Result caching for performance (first call determines the path for the process lifetime)
Clear warnings when multiple environment variables are set but differ
Added
cuda.pathfinder._utils.env_vars.CUDA_ENV_VARS_ORDEREDconstant that explicitly documents the canonical search order for CUDA environment variables.
Documentation#
Updated documentation across all packages to reflect the new
CUDA_PATHpriorityAdded detailed caching behavior documentation for
cuda.pathfinder._utils.env_vars.get_cuda_home_or_path()Clarified environment variable precedence in installation guides
Bug Fixes#
Improved robustness of test collection by adding fallback when cuda.pathfinder is not yet installed
Enhanced path comparison logic to properly handle edge cases (nonexistent paths, symlinks, OS-specific behavior)