Commit 4c9e344b authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

C API: Fix a bug with TF_OperationGetAttrTensor when TF_STRING tensors are

involved.

The TensorBuffer owned by a TF_Tensor object has a different memory layout than
the TensorBuffer owned by the corresponding tensorflow::Tensor object.
This change consolidates conversions between the runtime's tensorflow::Tensor
and the C API's TF_Tensor objects into a pair helper functions.

The added test: CApiAttributesTest.StringTensor fails without corresponding
changes to c_api.cc

PiperOrigin-RevId: 163091789
parent 1ee8217f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment