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

Method PollForStatus

tensorflow/stream_executor/cuda/cuda_event.cc:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace gpu {
24
25Event::Status GpuEvent::PollForStatus() {
26 port::StatusOr<CUresult> status =
27 GpuDriver::QueryEvent(parent_->gpu_context(), gpu_event_);
28 if (!status.ok()) {
29 LOG(ERROR) << "Error polling for event status: "
30 << status.status().error_message();
31 return Event::Status::kError;
32 }
33
34 switch (status.ValueOrDie()) {
35 case CUDA_SUCCESS:
36 return Event::Status::kComplete;
37 case CUDA_ERROR_NOT_READY:
38 return Event::Status::kPending;
39 default:
40 LOG(INFO) << "Error condition returned for event status: "
41 << status.ValueOrDie();
42 return Event::Status::kError;
43 }
44}
45
46} // namespace gpu
47} // namespace stream_executor

Callers 1

PollForEventStatusMethod · 0.45

Calls 3

gpu_contextMethod · 0.45
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected