MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / stop_and_wait

Method stop_and_wait

python/cutlass_cppgen/utils/profiler.py:76–88  ·  view source on GitHub ↗
(self, stream=None)

Source from the content-addressed store, hash-verified

74 pass
75
76 def stop_and_wait(self, stream=None):
77 if not stream:
78 stream = cuda.CUstream(0)
79
80 self.stop(stream)
81 if stream:
82 (err,) = cuda.cuStreamSynchronize(stream)
83 if err != cuda.CUresult.CUDA_SUCCESS:
84 raise RuntimeError(f"CUDA Error {str(err)}")
85 else:
86 (err,) = cudart.cudaDeviceSynchronize()
87 if err != cuda.CUresult.CUDA_SUCCESS:
88 raise RuntimeError(f"CUDA Error {str(err)}")
89
90 def duration(self, iterations=1):
91 err, duration = cuda.cuEventElapsedTime(self.events[0], self.events[1])

Callers 1

__call__Method · 0.45

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected