Skip to content

fix(core): depend on released cuda-pathfinder >=1.4.1#1735

Merged
cpcloud merged 4 commits intoNVIDIA:mainfrom
cpcloud:pathfinder-issue-980-new-pr
Mar 7, 2026
Merged

fix(core): depend on released cuda-pathfinder >=1.4.1#1735
cpcloud merged 4 commits intoNVIDIA:mainfrom
cpcloud:pathfinder-issue-980-new-pr

Conversation

@cpcloud
Copy link
Copy Markdown
Contributor

@cpcloud cpcloud commented Mar 6, 2026

Fixes #980

Supersedes #1733.

Summary

  • update cuda-core to depend on released cuda-pathfinder >=1.4.1 instead of unreleased >=1.4.2
  • add a TODO in cuda_core/pyproject.toml to bump to >=1.4.2 once that release is available

Test plan

  • nix run 'nixpkgs#pre-commit' -- run check-toml --files cuda_core/pyproject.toml

@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot Bot commented Mar 6, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

cpcloud added 4 commits March 6, 2026 18:54
Add a shared `optional_cuda_import` API in cuda.pathfinder so optional module checks only suppress genuinely unavailable modules or dynamic libs while still surfacing nested import bugs. Wire cuda.core NVVM/nvJitLink detection to this helper and declare cuda-pathfinder as a direct cuda-core dependency.

Made-with: Cursor
Apply ruff-preferred import ordering in pathfinder exports and rename an unused test lambda argument so repository-wide pre-commit checks pass cleanly.

Made-with: Cursor
Raise the cuda-core dependency floor to cuda-pathfinder>=1.4.2, move the new optional import note to 1.4.2 release notes, and simplify nvJitLink warning text by inlining the fixed version detail.

Made-with: Cursor
Set the cuda-core runtime dependency to cuda-pathfinder>=1.4.1 and add a TODO to bump to >=1.4.2 after that release is available so environment solves continue to work.

Made-with: Cursor
@cpcloud cpcloud force-pushed the pathfinder-issue-980-new-pr branch from f159931 to 0242b72 Compare March 6, 2026 23:58
@cpcloud cpcloud changed the title Improve optional CUDA module import handling for NVVM and nvJitLink fix(core): depend on released cuda-pathfinder >=1.4.1 Mar 6, 2026
@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 7, 2026

/ok to test

@cpcloud cpcloud requested a review from rwgk March 7, 2026 00:01
@cpcloud cpcloud enabled auto-merge (squash) March 7, 2026 00:09
@github-actions

This comment has been minimized.

@cpcloud cpcloud merged commit b25a648 into NVIDIA:main Mar 7, 2026
86 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 7, 2026

Doc Preview CI
Preview removed because the pull request was closed or merged.

@leofang leofang added this to the cuda.core v0.7.0 milestone Apr 7, 2026
cpcloud added a commit to cpcloud/cuda-python that referenced this pull request Apr 28, 2026
Roborev review NVIDIA#1735 flagged two issues with the unlink-retry commit:

1. **HIGH**: schema-mismatch wipe in __init__ suppressed every
   PermissionError then advanced the schema marker anyway. If a
   Windows-locked entry survived the wipe, future opens would skip
   the wipe and lookups could return bytes from the incompatible
   old format.

2. **MEDIUM**: _enforce_size_cap and _prune_if_stat_unchanged
   suppressed every PermissionError, hiding real configuration
   failures (POSIX ACL issues, Windows non-sharing winerrors).

Fix: add ``_is_windows_sharing_violation(exc)`` so best-effort callers
can filter the exhausted-Windows-sharing case while letting other
PermissionError instances propagate. Apply at:

* ``_prune_if_stat_unchanged``: catch + filter; non-sharing PE re-raises.
* Schema-mismatch wipe: track ``wipe_complete``; only advance the
  schema marker if every old entry was successfully removed.
* ``_enforce_size_cap``: catch + filter.

Tests cover the new propagation paths (POSIX PermissionError surfaces,
not silently swallowed) and the schema-marker preservation when an
old entry is locked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Robust imports of optional dependencies (nvvm, nvJitLink)

3 participants