diff options
author | 2018-06-21 16:08:59 -0700 | |
---|---|---|
committer | 2018-06-21 16:12:06 -0700 | |
commit | f2b5c4d65610734f0783da091fe0c300dca8273d (patch) | |
tree | d134da3055f922683a73153d2bdb5a8f1761d98d /tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h | |
parent | 448596097801f24c14d5705fc5a8dc434c3ee1b8 (diff) |
[TF:XLA] Remove code for bitwise ops on float types from evaluator.
No functional change.
These ops only support integral types, so this code is not reachable.
PiperOrigin-RevId: 201604419
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h b/tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h index 0c26ed208a..8b08756c64 100644 --- a/tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h +++ b/tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor.h @@ -610,12 +610,7 @@ class HloEvaluatorTypedVisitor : public DfsHloVisitorWithDefault { template <typename NativeT, typename std::enable_if<std::is_floating_point< NativeT>::value>::type* = nullptr> Status HandleAnd(HloInstruction* and_) { - TF_ASSIGN_OR_RETURN( - parent_->evaluated_[and_], - ElementWiseBinaryOp(and_, [](ElementwiseT lhs_el, ElementwiseT rhs_el) { - return lhs_el && rhs_el; - })); - return Status::OK(); + return InvalidArgument("Unsupported type for And"); } template < @@ -644,12 +639,7 @@ class HloEvaluatorTypedVisitor : public DfsHloVisitorWithDefault { template <typename NativeT, typename std::enable_if<std::is_floating_point< NativeT>::value>::type* = nullptr> Status HandleOr(HloInstruction* or_) { - TF_ASSIGN_OR_RETURN( - parent_->evaluated_[or_], - ElementWiseBinaryOp(or_, [](ElementwiseT lhs_el, ElementwiseT rhs_el) { - return lhs_el || rhs_el; - })); - return Status::OK(); + return InvalidArgument("Unsupported type for Or"); } template < |