From ef3ee202659a2a49afcd9898451bf9b1256a2757 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 21 Nov 2017 22:27:21 -0800 Subject: [XLA] Add BitcastConvert HLO op to enable bitwise operations on floating point types. PiperOrigin-RevId: 176610007 --- tensorflow/compiler/xla/service/shape_inference.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tensorflow/compiler/xla/service/shape_inference.h') 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 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 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 InferReducePrecisionShape(const Shape& operand_shape, -- cgit v1.2.3