| 64 | namespace internal { |
| 65 | |
| 66 | Status 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 |
no test coverage detected