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

Method HostCallback

tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:753–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753bool 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,

Callers

nothing calls this directly

Calls 3

callbackFunction · 0.85
AsGpuStreamValueFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected