MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / BeginCapture

Method BeginCapture

ngscuda/cuda_core.hpp:106–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 void BeginCapture()
107 {
108 capture_ok = false;
109 ngla::EnsureCuBlasWorkspace();
110 prev_stream = ngs_cuda_stream;
111 ngs_cuda_stream = stream;
112 if (stream_change_callback) {
113 stream_change_callback(ngs_cuda_stream);
114 }
115 auto err = cudaStreamBeginCapture(stream, cudaStreamCaptureModeGlobal);
116 if (err != cudaSuccess)
117 throw ngstd::Exception(std::string("[CudaGraph] cudaStreamBeginCapture FAILED: ")
118 + cudaGetErrorString(err));
119 }
120
121 void EndCapture()
122 {

Callers 1

MultMethod · 0.80

Calls 1

EnsureCuBlasWorkspaceFunction · 0.85

Tested by

no test coverage detected