From a82e0e7922d6dc657b42ef2b3a7a1a52194454c8 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 1 May 2018 09:07:57 -0700 Subject: Fix crash in HloGraphDumper where it crashes on tuple shaped constants The problem is that it tries to use a special logic for 0 element constants but the logic used to check the number of elements only supports array shapes. PiperOrigin-RevId: 194945246 --- tensorflow/compiler/xla/service/hlo_graph_dumper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/compiler/xla/service/hlo_graph_dumper.cc') diff --git a/tensorflow/compiler/xla/service/hlo_graph_dumper.cc b/tensorflow/compiler/xla/service/hlo_graph_dumper.cc index 516e14b464..bb4db89f0a 100644 --- a/tensorflow/compiler/xla/service/hlo_graph_dumper.cc +++ b/tensorflow/compiler/xla/service/hlo_graph_dumper.cc @@ -804,7 +804,7 @@ string HloDotDumper::GetInstructionNodeInlinedOperands( // "{} (f32[42, 0, 10])". The alternative, calling Literal::ToString(), // enumerates all of its empty dimensions (e.g. "{ { {}, {} }, ..."), which // is just noise. - if (ShapeUtil::HasZeroElements(shape)) { + if (!ShapeUtil::IsTuple(shape) && ShapeUtil::HasZeroElements(shape)) { return Printf("{} (%s)", ShapeUtil::HumanString(constant->shape())); } -- cgit v1.2.3