diff options
author | 2018-08-23 23:57:51 -0700 | |
---|---|---|
committer | 2018-08-24 00:01:56 -0700 | |
commit | 0a1b9ed01e48092f4167e366cf7496c2b111ef6d (patch) | |
tree | 7cdd04e96b485239bb12df4c0d69b2d4f9cfbb26 /tensorflow/compiler/xla/service/conditional_simplifier_test.cc | |
parent | 769f83b04126e10bcb4b18bf7ddc018c3e716e03 (diff) |
[XLA] Add and use a layout-sensitive HLO verifier.
For now, this verifier checks some noncontroversial invariants, like:
- Fusion operands and fusion computation parameters must have matching layouts.
- Same for while loops, calls, kConditional.
It's a bit of a pain to add these explicit layout-sensitive and
allow-mixed-precision flags everywhere, but I think it's better than
adding default args. With default args we can easily mix up the order,
and we'd only be able to add new flags to the end of the list.
PiperOrigin-RevId: 210059349
Diffstat (limited to 'tensorflow/compiler/xla/service/conditional_simplifier_test.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/conditional_simplifier_test.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/conditional_simplifier_test.cc b/tensorflow/compiler/xla/service/conditional_simplifier_test.cc index c43a31b167..6c477da038 100644 --- a/tensorflow/compiler/xla/service/conditional_simplifier_test.cc +++ b/tensorflow/compiler/xla/service/conditional_simplifier_test.cc @@ -39,6 +39,10 @@ namespace op = xla::testing::opcode_matchers; class ConditionalSimplifierTest : public HloVerifiedTestBase { public: + ConditionalSimplifierTest() + : HloVerifiedTestBase(/*layout_sensitive=*/false, + /*allow_mixed_precision=*/false) {} + // Makes a computation that contains a conditional with constant predicate. HloComputation* MakeConditional(HloModule* module); }; |