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

Method Compute

tensorflow/core/kernels/tensor_array_ops.cc:1404–1411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1402 : OpKernel(context) {}
1403
1404 void Compute(OpKernelContext* ctx) override {
1405 TensorArray* tensor_array;
1406 OP_REQUIRES_OK(ctx, GetTensorArray(ctx, &tensor_array));
1407 core::ScopedUnref unref(tensor_array);
1408 Tensor* output = nullptr;
1409 OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &output));
1410 OP_REQUIRES_OK(ctx, tensor_array->Size(&(output->scalar<int32>()())));
1411 }
1412};
1413
1414REGISTER_KERNEL_BUILDER(Name("TensorArraySize").Device(DEVICE_CPU),

Callers

nothing calls this directly

Calls 4

GetTensorArrayFunction · 0.85
allocate_outputMethod · 0.80
TensorShapeClass · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected