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

Method Compute

tensorflow/python/framework/test_ops.cc:93–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 using OpKernel::OpKernel;
92
93 void Compute(OpKernelContext* ctx) override {
94 Tensor* output;
95 OP_REQUIRES_OK(ctx,
96 ctx->allocate_output("result", TensorShape({}), &output));
97 switch (KL) {
98 case DEFAULT_LABEL:
99 output->scalar<tstring>()() = "My label is: default";
100 break;
101 case OVERLOAD_1_LABEL:
102 output->scalar<tstring>()() = "My label is: overload_1";
103 break;
104 case OVERLOAD_2_LABEL:
105 output->scalar<tstring>()() = "My label is: overload_2";
106 break;
107 }
108 }
109};
110
111REGISTER_KERNEL_BUILDER(Name("KernelLabel").Device(DEVICE_CPU),

Callers

nothing calls this directly

Calls 2

allocate_outputMethod · 0.80
TensorShapeClass · 0.70

Tested by

no test coverage detected