Repository navigation
[FEA]: Add support for user-opt-in logging in path finder #650
Description
Activity
- addedenhancementAny code-related improvementsAny code-related improvementstriageNeeds the team's attentionNeeds the team's attention
on May 20, 2025 - added a parent issue
on May 20, 2025 - addedcuda.bindingsEverything related to the cuda.bindings moduleEverything related to the cuda.bindings module
on May 20, 2025 - addedcuda.pathfinderEverything related to the cuda.pathfinder moduleEverything related to the cuda.pathfinder module
on Jul 2, 2025 - changed the title
[-]Add support for user-opt-in logging in path finder[/-][+][FEA]: Add support for user-opt-in logging in path finder[/+]on Mar 4, 2026 - addedfeatureNew feature or requestNew feature or requestand removedenhancementAny code-related improvementsAny code-related improvements
on Mar 4, 2026 Hi @leofang @rparolin, I'd like to take this one. It's unassigned with no branch or PR, and I have a CUDA dev setup on Ubuntu to test against. Since it was moved out of the pathfinder backlog, could you confirm you'd still accept an external PR before I invest? Assuming yes, here's the approach I'd propose so we can lock the interface up front:
- Standard-library
loggingwith a dedicatedcuda.pathfinderlogger, off by default since it sits on the import hot path. - Opt-in via an env var, e.g.
CUDA_PATHFINDER_LOG_LEVELmapped to standard logging levels (happy to match whatever naming convention you prefer), plus optionally a small programmatic setter. - On each lookup, emit a search trail: candidate paths and their order, env vars consulted (CUDA_HOME, LD_LIBRARY_PATH, conda/pip locations), the resolved path and version actually loaded, fallbacks taken, and on failure the full list of paths tried. This mirrors the CuPy (cupy#9127) and nvmath-python logging you linked.
- Tests via pytest
caplog, most of which run without a GPU.
Does the interface (logger name, env var, optional API toggle) look right? If so, I'll scope the PR to cuda.pathfinder. Thanks!
- Standard-library
@rwgk Can you comment on the proposed direction above? Thanks!
@rwgk @rparolin friendly ping on the above. Rather than keep the interface question open, I'm happy to just open a draft PR against what I sketched (dedicated cuda.pathfinder logger, CUDA_PATHFINDER_LOG_LEVEL, off by default) so there's something concrete to react to, and adjust naming from review. Planning to start on that this week unless you'd rather settle the interface first.
Opened a draft PR implementing the interface above, scoped to load_nvidia_dynamic_lib. Happy to extend to the other four finder families, or change the naming and levels, whatever suits.
@rparolin Thanks for the assign. The draft's ready for a look whenever, and could someone post /ok to test so CI can report on it? Happy to un-draft once it's green, or extend to the other four finder families if you like the shape.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsIn Progress
Examples: