| 673 | using OpKernel::OpKernel; |
| 674 | |
| 675 | void Compute(OpKernelContext* ctx) override { |
| 676 | Tensor* output; |
| 677 | OP_REQUIRES_OK(ctx, |
| 678 | ctx->allocate_output("device", TensorShape({}), &output)); |
| 679 | output->scalar<tstring>()() = ctx->device()->name(); |
| 680 | } |
| 681 | }; |
| 682 | |
| 683 | REGISTER_KERNEL_BUILDER(Name("DevicePlacementOp").Device(DEVICE_CPU), |
nothing calls this directly
no test coverage detected