| 751 | } |
| 752 | |
| 753 | bool GpuExecutor::HostCallback(Stream* stream, |
| 754 | std::function<port::Status()> callback) { |
| 755 | auto callback_ptr = new std::function<void()>([callback]() { |
| 756 | port::Status s = callback(); |
| 757 | if (!s.ok()) { |
| 758 | LOG(WARNING) << "Host callback failed: " << s; |
| 759 | } |
| 760 | }); |
| 761 | return GpuDriver::AddStreamCallback(context_, AsGpuStreamValue(stream), |
| 762 | InternalHostCallback, callback_ptr); |
| 763 | } |
| 764 | |
| 765 | /* static */ void GpuExecutor::InternalHostCallback(CUstream stream, |
| 766 | CUresult status, |
nothing calls this directly
no test coverage detected