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

Method HostCallback

tensorflow/stream_executor/rocm/rocm_gpu_executor.cc:597–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597bool 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,

Callers

nothing calls this directly

Calls 3

callbackFunction · 0.85
AsGpuStreamValueFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected