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

Method PollForStatus

tensorflow/stream_executor/rocm/rocm_event.cc:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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