diff options
author | 2018-06-04 07:52:01 -0700 | |
---|---|---|
committer | 2018-06-04 07:55:17 -0700 | |
commit | 01c4773f435c556712c5465792f2936b5c762a1e (patch) | |
tree | ca38fb31054f9741acbba1e3318f9dfc14da0ee6 | |
parent | edd936e4ea1bd9f1f9ee05af92efc3bae5f1515a (diff) |
[XLA:GPU] Add error message to CHECK for preconditions to lower fusions with multiple reduce outputs.
PiperOrigin-RevId: 199132442
-rw-r--r-- | tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc b/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc index 0f5c003341..b40b557cab 100644 --- a/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc +++ b/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc @@ -2443,8 +2443,11 @@ StatusOr<std::unique_ptr<Thunk>> IrEmitterUnnested::BuildInitializerThunk( case HloOpcode::kReduce: return inst->operand(1); case HloOpcode::kTuple: - CHECK(hlo->IsMultiOutputFusion() && - inst->operand(index.back())->opcode() == HloOpcode::kReduce); + CHECK(hlo->IsMultiOutputFusion()) + << ": " << hlo->ToString() << " is not a multi-output fusion."; + CHECK(inst->operand(index.back())->opcode() == HloOpcode::kReduce) + << ": Found '" << inst->operand(index.back())->opcode() << "' in " + << inst->ToString() << " but expected 'reduce'."; // For multi-output fusion look through the tuple. return inst->operand(index.back())->operand(1); default: |