| 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 | |
| 111 | REGISTER_KERNEL_BUILDER(Name("KernelLabel").Device(DEVICE_CPU), |
nothing calls this directly
no test coverage detected