Skip to content

[BUG][pathfinder] Windows system DLL search fails to load CUDA dependencies #1781

@rwgk

Description

@rwgk

Summary

When CUDA DLLs are discovered via the Windows system search (PATH), the initial DLL can be found, but its co-located dependencies fail to load. This shows up as error 126 during LoadLibraryExW and breaks the pathfinder fallback on Windows systems without CUDA_HOME/CUDA_PATH configured.

Problem

  • The current pathfinder Windows logic calls LoadLibraryExW with flags=0 after finding a CUDA DLL on PATH.
  • Windows loads the target DLL, but does not search the DLL's directory for it dependencies, so dependency resolution fails (error 126).
  • This prevents loading NVRTC and related CUDA DLLs for users who rely on PATH instead of CUDA_HOME or CUDA_PATH.

Why this went unnoticed

  • Our Windows test environments always have CUDA_HOME or CUDA_PATH set.
  • That means the PATH-based fallback path is rarely exercised, so dependency load failures did not surface in CI or local testing.

Proposed fix (WIP)

References

Metadata

Metadata

Assignees

Labels

P0High priority - Must do!bugSomething isn't workingcuda.pathfinderEverything related to the cuda.pathfinder module

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions