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

Method SynchronousMemcpyD2H

tensorflow/stream_executor/rocm/rocm_driver.cc:879–893  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

877}
878
879/* static */ port::Status GpuDriver::SynchronousMemcpyD2H(
880 GpuContext* context, void* host_dst, hipDeviceptr_t gpu_src, uint64 size) {
881 ScopedActivateContext activation{context};
882 hipError_t res = tensorflow::wrap::hipMemcpyDtoH(host_dst, gpu_src, size);
883 if (res != hipSuccess) {
884 return port::InternalError(
885 absl::StrFormat("failed to synchronous memcpy from device to host: %s; "
886 "host dst: %p; Gpu src: %p; size: %llu=0x%llx",
887 ToString(res).c_str(), host_dst,
888 absl::bit_cast<void*>(gpu_src), size, size));
889 }
890 VLOG(2) << "successfully sync memcpy'd d2h of " << size << " bytes to "
891 << host_dst;
892 return port::Status::OK();
893}
894
895/* static */ port::Status GpuDriver::SynchronousMemcpyH2D(
896 GpuContext* context, hipDeviceptr_t gpu_dst, const void* host_src,

Callers 3

make_recv_callbackFunction · 0.45
MemoryDebugStringMethod · 0.45
CheckMaskFunction · 0.45

Calls 3

c_strMethod · 0.80
ToStringFunction · 0.70
InternalErrorFunction · 0.50

Tested by 1

make_recv_callbackFunction · 0.36