MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetElapsedMilliseconds

Method GetElapsedMilliseconds

tensorflow/stream_executor/gpu/gpu_timer.cc:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64float GpuTimer::GetElapsedMilliseconds() const {
65 CHECK(start_event_ != nullptr && stop_event_ != nullptr);
66 // TODO(leary) provide a way to query timer resolution?
67 // CUDA docs say a resolution of about 0.5us
68 float elapsed_milliseconds = NAN;
69 (void)GpuDriver::GetEventElapsedTime(
70 parent_->gpu_context(), &elapsed_milliseconds, start_event_, stop_event_);
71 return elapsed_milliseconds;
72}
73
74bool GpuTimer::Start(GpuStream* stream) {
75 port::Status status = GpuDriver::RecordEvent(

Calls 1

gpu_contextMethod · 0.45

Tested by

no test coverage detected