| 595 | } |
| 596 | |
| 597 | bool GpuExecutor::HostCallback(Stream* stream, |
| 598 | std::function<port::Status()> callback) { |
| 599 | auto callback_ptr = new std::function<void()>([callback]() { |
| 600 | port::Status s = callback(); |
| 601 | if (!s.ok()) { |
| 602 | LOG(WARNING) << "Host callback failed: " << s; |
| 603 | } |
| 604 | }); |
| 605 | return GpuDriver::AddStreamCallback(context_, AsGpuStreamValue(stream), |
| 606 | InternalHostCallback, callback_ptr); |
| 607 | } |
| 608 | |
| 609 | /* static */ void GpuExecutor::InternalHostCallback(GpuStreamHandle stream, |
| 610 | hipError_t status, |
nothing calls this directly
no test coverage detected