aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/shape_inference.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-21 22:27:21 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-21 22:31:07 -0800
commitef3ee202659a2a49afcd9898451bf9b1256a2757 (patch)
treeff71c530bded067ef56760d3c922e03ad952bed2 /tensorflow/compiler/xla/service/shape_inference.h
parent7f88363810e77a39db919fb4000583ad0138e53c (diff)
[XLA] Add BitcastConvert HLO op to enable bitwise operations on
floating point types. PiperOrigin-RevId: 176610007
Diffstat (limited to 'tensorflow/compiler/xla/service/shape_inference.h')
-rw-r--r--tensorflow/compiler/xla/service/shape_inference.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/shape_inference.h b/tensorflow/compiler/xla/service/shape_inference.h
index d5d497176d..0aadb98a40 100644
--- a/tensorflow/compiler/xla/service/shape_inference.h
+++ b/tensorflow/compiler/xla/service/shape_inference.h
@@ -204,6 +204,13 @@ class ShapeInference {
static StatusOr<Shape> InferConvertShape(const Shape& operand_shape,
PrimitiveType new_element_type);
+ // Helper that validates the given operand shape can be bitcast converted to
+ // the target output_shape via a bitcast convert instruction -- the
+ // requirement is that the shape is identical except for the element type and
+ // the element types have identical bit-widths.
+ static StatusOr<Shape> InferBitcastConvertShape(
+ const Shape& operand_shape, PrimitiveType new_element_type);
+
// Helper that validates the input data type for a reduce-precision operation,
// and returns the result shape.
static StatusOr<Shape> InferReducePrecisionShape(const Shape& operand_shape,