| 335 | ~TensorListLength() override {} |
| 336 | |
| 337 | void Compute(OpKernelContext* c) override { |
| 338 | const TensorList* l = nullptr; |
| 339 | OP_REQUIRES_OK(c, GetInputList(c, 0, &l)); |
| 340 | Tensor* result; |
| 341 | OP_REQUIRES_OK(c, c->allocate_output(0, TensorShape{}, &result)); |
| 342 | result->scalar<int32>()() = l->tensors().size(); |
| 343 | } |
| 344 | }; |
| 345 | |
| 346 | REGISTER_KERNEL_BUILDER(Name("TensorListLength").Device(DEVICE_CPU), |
nothing calls this directly
no test coverage detected