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

Method Compute

tensorflow/python/framework/test_ops.cc:675–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
683REGISTER_KERNEL_BUILDER(Name("DevicePlacementOp").Device(DEVICE_CPU),

Callers

nothing calls this directly

Calls 4

allocate_outputMethod · 0.80
TensorShapeClass · 0.70
nameMethod · 0.65
deviceMethod · 0.45

Tested by

no test coverage detected