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
{{ message }}
Repository navigation
[BUG][pathfinder] Windows system search fails to find any CUDA DLL when CUDA_HOME/CUDA_PATH are not set #1781
EDIT after merging #1795: The final conclusions was "Working As Intended, update the documentation"
Summary
On Windows, the pathfinder's load_with_system_search() fails to find all CUDA Toolkit DLLs when CUDA_HOME/CUDA_PATH are not set. The DLLs are on PATH but LoadLibraryExW never finds them.
The application directory (Python's install directory)
The system directory (System32)
Directories explicitly added via AddDllDirectory()
PATH is excluded entirely. The current code calls LoadLibraryExW(dll_name, None, 0) with a bare DLL name, so it silently fails to find any CUDA DLL that isn't in one of those three locations.
Note: This was initially misdiagnosed as a dependency-resolution issue (error 126 for co-located DLLs like nvrtc-builtins). Experiments uncovered the problem is more fundamental: LoadLibraryExW never finds the DLL in the first place, affecting all CTK libraries equally.
Why this went unnoticed
Our CI Windows test environments always have CUDA_HOME or CUDA_PATH set.
The CUDA_HOME/CUDA_PATH search step runs before system search and successfully locates the DLLs, so the PATH-based fallback was never exercised.
changed the title [-][BUG][pathfinder] Windows system DLL search fails to load CUDA dependencies[/-][+][BUG][pathfinder] Windows system search fails to find any CUDA DLL when CUDA_HOME/CUDA_PATH are not set[/+]on Mar 19, 2026
Activity
test: add regression test for NVIDIA#1781 (nvrtc loading without CUDA…
[-][BUG][pathfinder] Windows system DLL search fails to load CUDA dependencies[/-][+][BUG][pathfinder] Windows system search fails to find any CUDA DLL when CUDA_HOME/CUDA_PATH are not set[/+]