cuda.bindings._v2.driver.stream_begin_recapture_to_graph#
- cuda.bindings._v2.driver.stream_begin_recapture_to_graph(
- intptr_t h_stream,
- int mode,
- intptr_t h_graph,
- intptr_t callback_func,
- intptr_t user_data,
Begin graph capture on a stream to an existing graph.
Begin graph capture on
h_streamto the existingh_graph. The node creation order while recapturing the graph must be identical to the original graph. The recapture will fail immediately for:.Topology mismatches between the existing graph and the recaptured graph.
Parameter mismatches for memory allocation or free nodes.
Any other node parameter mismatches during recapture can be configured to call the function provided in
callback_func. The recapture will fail immediately if the callback returns anything other than CUDA_SUCCESS. If the recapture fails for any reason, thegraphwill be in an undefined state and should be destroyed. See cuStreamBeginCapture for additional detail on beginning the capture.- Parameters:
h_stream (intptr_t) – Stream in which to initiate capture.
mode (StreamCaptureMode) – Controls the interaction of this capture sequence with other API calls that are potentially unsafe. For more details see
cuThreadExchangeStreamCaptureMode.h_graph (intptr_t) – Existing CUDA graph to be captured into.
callback_func (intptr_t) – Function that will be called for all parameter mismatches from the original graph.
user_data (intptr_t) – A generic pointer to user data that is passed into the callback function.
Note
Any user objects associated with
graphwill be released prior to the recapture.See also
cuStreamBeginRecaptureToGraph