[XLA] Make ShapeUtil::PermuteDimensions() properly permute layouts.
Although there was no API comment explaining what PermuteDimensions()
intended to do with layouts, the intent seems to be that if the input
shape has a layout, then
TransposeIsBitcast(input_shape, PermuteDimensions(input_shape, perm),
InversePermutation(perm))
is true.
This was not previously correct. (I can't really say what the old
behavior was, although maybe there's some clever interpretation of what
it used to do.)
PiperOrigin-RevId: 203290794
Loading
Please sign in to comment