tensorflow/compiler/tf2xla/shape_util.cc
// Convert a TensorShape into the equivalent XLA Shape proto.
Convert a TensorShape into the equivalent XLA Shape proto.
Convert a TensorShape into the equivalent XLA Shape proto .
Status TensorShapeToXLAShape(DataType dtype, const TensorShape& tensor_shape,
                             xla::Shape* shape) {
  xla::PrimitiveType type;
  TF_RETURN_IF_ERROR(DataTypeToPrimitiveType(dtype, &type));
  *shape = TensorShapeToXLAShape(type, tensor_shape);
  return Status::OK();
}
Status TensorShapeToXLAShape ( DataType dtype , const TensorShape & tensor_shape , xla :: Shape * shape ) { xla :: PrimitiveType type ; TF_RETURN_IF_ERROR ( DataTypeToPrimitiveType ( dtype , & type ) ) ; * shape = TensorShapeToXLAShape ( type , tensor_shape ) ; return Status :: OK ( ) ; }
Convert a TensorShape into the equivalent XLA Shape proto.
Convert a TensorShape into the equivalent XLA Shape proto .