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

Function ValidateDevice

tensorflow/core/framework/resource_mgr.cc:66–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64namespace internal {
65
66Status ValidateDevice(OpKernelContext* ctx, const ResourceHandle& p) {
67 if (ctx->device()->physical_name() != p.device()) {
68 return errors::InvalidArgument(
69 "Trying to access resource ", p.name(), " located in device ",
70 p.device(), " from device ", ctx->device()->attributes().name());
71 }
72 return Status::OK();
73}
74
75} // end namespace internal
76

Callers 2

ValidateDeviceAndTypeFunction · 0.85
DeleteResourceFunction · 0.85

Calls 3

InvalidArgumentFunction · 0.85
nameMethod · 0.65
deviceMethod · 0.45

Tested by

no test coverage detected