Skip to content

Support interop with active green contexts#853

Draft
caugonnet wants to merge 2 commits intoNVIDIA:mainfrom
caugonnet:green_context_interop
Draft

Support interop with active green contexts#853
caugonnet wants to merge 2 commits intoNVIDIA:mainfrom
caugonnet:green_context_interop

Conversation

@caugonnet
Copy link
Copy Markdown
Contributor

Teach the CUDA runtime to borrow externally activated green-context-derived execution contexts while continuing to reject ordinary non-primary contexts, and scope loaded kernels to the active execution context so resets do not reuse stale handles. Protect destructive reset/close paths from touching borrowed contexts, add CUDA 13 interop coverage, and document the supported phase-1 behavior.

Teach the CUDA runtime to borrow externally activated green-context-derived execution contexts while continuing to reject ordinary non-primary contexts, and scope loaded kernels to the active execution context so resets do not reuse stale handles. Protect destructive reset/close paths from touching borrowed contexts, add CUDA 13 interop coverage, and document the supported phase-1 behavior.

Made-with: Cursor
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 9, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Keep the branch focused on the implementation and tests by dropping the temporary support summary from the committed changes.

Made-with: Cursor
Comment on lines +88 to +99
def _locate_nvidia_header_directory(name):
locator = getattr(pathfinder, "locate_nvidia_header_directory", None)
if locator is None:
locator = getattr(pathfinder, "find_nvidia_header_directory", None)
if locator is None:
return None
located = locator(name)
if located is None:
return None
if hasattr(located, "abs_path") and hasattr(located, "found_via"):
return located
return _header_dir_info("cuda.pathfinder", located)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Did you do this because you did not want to raise the lower bound of cuda-pathfinder (to the version that offers these APIs?)

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.

2 participants