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

Function TensorShapeToXLAShape

tensorflow/compiler/tf2xla/shape_util.cc:102–108  ·  view source on GitHub ↗

Convert a TensorShape into the equivalent XLA Shape proto.

Source from the content-addressed store, hash-verified

100
101// Convert a TensorShape into the equivalent XLA Shape proto.
102Status TensorShapeToXLAShape(DataType dtype, const TensorShape& tensor_shape,
103 xla::Shape* shape) {
104 xla::PrimitiveType type;
105 TF_RETURN_IF_ERROR(DataTypeToPrimitiveType(dtype, &type));
106 *shape = TensorShapeToXLAShape(type, tensor_shape);
107 return Status::OK();
108}
109
110xla::Shape TensorShapeToXLAShape(xla::PrimitiveType type,
111 const TensorShape& tensor_shape) {

Callers 15

TestShapeRepresentationFunction · 0.85
XlaCompilerMethod · 0.85
XLAShapeForArgumentMethod · 0.85
TEST_FFunction · 0.85
ReadVariableInputTensorFunction · 0.85
AssignVariableTensorFunction · 0.85
OneHotMethod · 0.85

Calls 5

DataTypeToPrimitiveTypeFunction · 0.85
rbeginMethod · 0.80
rendMethod · 0.80
dimsMethod · 0.45
dim_sizeMethod · 0.45

Tested by 2

TestShapeRepresentationFunction · 0.68
TEST_FFunction · 0.68