aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Bixia Zheng <bixia@google.com>2018-02-26 15:42:52 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-26 15:50:09 -0800
commit175730d3791618a496a5c66d7d6fef9c7768cf34 (patch)
tree82a51db8533fad6af8b9d8283ea571dfa61b7f51 /tools
parentaa2f0b68fb7052ea46547bf15fb8a46f6447f182 (diff)
[XLA] Fix #17090 a problem in IrArray::Index::SourceIndexOfTranspose.
Agebraic simplification transforms bitcast-equivalent transpose/reshape instructions to bitcast instructions before IR emission. As such, we should skip the checking on whether a transpose/reshape instruction is bitcast-equivalent or not during IR emission. Remove the call from IrArray::Index::SourceIndexOfTranspose to ShapeUtil::TransposeIsBitcast. Also remove the call from IrArray::Index::SourceIndexOfReshape to ShapeUtil::ReshapeIsBitcast. Remove the calls to ShapeUtil::TransposeIsBitcast and ShapeUtil::ReshapeIsBitcast from NotWorthHoistingIndividually because layout assignment hasn't been done there yet. Instead, returns true when the input is a transpose or reshape instruction, to prevent it from being hoisted out of loops. Add a check to ShapeUtil::TransposeIsBitcast and ShapeUtil::ReshapeIsBitcast to make sure that both input shape and output shape have layouts. Add two test cases. PiperOrigin-RevId: 187093399
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions