aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/shape_inference.cc
diff options
context:
space:
mode:
authorGravatar Tayo Oguntebi <tayo@google.com>2018-10-01 15:47:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-01 15:57:46 -0700
commit28a5ce4cf8702a6605e13a99c861ec6f2cd75929 (patch)
treea268b7563eac336373d59bfcfc88196bf095cb55 /tensorflow/compiler/xla/service/shape_inference.cc
parentdc4ac1b84c9c74655f04254779516f9968a5c385 (diff)
Improve error message in transpose shape inference.
PiperOrigin-RevId: 215294817
Diffstat (limited to 'tensorflow/compiler/xla/service/shape_inference.cc')
-rw-r--r--tensorflow/compiler/xla/service/shape_inference.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/shape_inference.cc b/tensorflow/compiler/xla/service/shape_inference.cc
index 7194b2cafd..6ccea9d2b5 100644
--- a/tensorflow/compiler/xla/service/shape_inference.cc
+++ b/tensorflow/compiler/xla/service/shape_inference.cc
@@ -2380,7 +2380,9 @@ ShapeInference::InferDegenerateDimensionBroadcastShape(HloOpcode operation,
!std::is_permutation(dimensions.begin(), dimensions.end(),
indices.begin())) {
return InvalidArgument(
- "Transpose dimensions not a permutation of the operand dimensions.");
+ "Transpose dimensions [%s] are not a permutation of the operand "
+ "dimensions (operand shape is %s).",
+ StrJoin(dimensions, ","), ShapeUtil::HumanString(operand));
}
// Permute(dimensions,input) computes output[dimensions[i]]=input[i]. However,