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

Method Checksum

tensorflow/core/common_runtime/gpu/gpu_util.cc:440–454  ·  view source on GitHub ↗

TODO(pbar) Checksum is called from places without a valid device context.

Source from the content-addressed store, hash-verified

438
439// TODO(pbar) Checksum is called from places without a valid device context.
440uint64 GPUUtil::Checksum(Device* gpu_device,
441 const DeviceContext* device_context,
442 const Tensor& tensor) {
443 Tensor copy(tensor.dtype(), tensor.shape());
444 Status s;
445 Notification n;
446 CopyGPUTensorToCPU(gpu_device, device_context, &tensor, &copy,
447 [&s, &n](Status status) {
448 s.Update(status);
449 n.Notify();
450 });
451 n.WaitForNotification();
452 CHECK(s.ok()) << s;
453 return Checksum(copy);
454}
455
456uint64 GPUUtil::Checksum(const Tensor& tensor) {
457 const float* fptr = reinterpret_cast<const float*>(GetBase(&tensor));

Callers

nothing calls this directly

Calls 11

ChecksumFunction · 0.85
isnanClass · 0.85
GetBaseFunction · 0.70
Hash64Function · 0.50
dtypeMethod · 0.45
shapeMethod · 0.45
UpdateMethod · 0.45
NotifyMethod · 0.45
WaitForNotificationMethod · 0.45
okMethod · 0.45
TotalBytesMethod · 0.45

Tested by

no test coverage detected