MCPcopy Create free account
hub / github.com/XpuOS/xsched / XStreamEndCaptureImpl

Function XStreamEndCaptureImpl

platforms/cuda/shim/src/shim.cpp:215–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215static inline CUresult XStreamEndCaptureImpl(CUstream stream, CUgraph *graph)
216{
217 CUstreamCaptureStatus before = CU_STREAM_CAPTURE_STATUS_NONE;
218 CUresult qres = Driver::StreamIsCapturing(stream, &before);
219 CUresult res = Driver::StreamEndCapture(stream, graph);
220 if (res != CUDA_ERROR_STREAM_CAPTURE_UNMATCHED && // end capture on the correct stream
221 qres == CUDA_SUCCESS && before != CU_STREAM_CAPTURE_STATUS_NONE) {
222 // The stream is capturing before, check if it is actually stopped.
223 CUstreamCaptureStatus after = CU_STREAM_CAPTURE_STATUS_NONE;
224 qres = Driver::StreamIsCapturing(stream, &after);
225 if (qres == CUDA_SUCCESS && after == CU_STREAM_CAPTURE_STATUS_NONE) {
226 CaptureEnd();
227 }
228 }
229 return res;
230}
231
232CUresult XStreamEndCapture(CUstream stream, CUgraph *graph)
233{

Callers 2

XStreamEndCaptureFunction · 0.85
XStreamEndCapture_ptszFunction · 0.85

Calls 1

CaptureEndFunction · 0.85

Tested by

no test coverage detected