Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cuda_core/cuda/core/graph/_graph_builder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -931,11 +931,14 @@ cdef inline void GB_callback(
if fail_tail_discovery_for_testing:
raise RuntimeError("forced capture tail discovery failure")
host_node = _capture_tail_node(c_stream)
except:
except BaseException as orig_exc:
# CUDA added the callback, but its node cannot be identified.
# Retain its owners anonymously to prevent dangling pointers.
commit_status = graph_commit_attachment(prepared, NULL)
HANDLE_RETURN(commit_status)
try:
HANDLE_RETURN(commit_status)
except Exception as commit_exc:
raise commit_exc from orig_exc
raise
HANDLE_RETURN(graph_commit_attachment(prepared, host_node))

Expand Down
Loading