This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Drop unit-trip loops of reductions only if other reduction loops exists.
ClosedPublic

Authored by mravishankar on Apr 8 2021, 2:51 PM.

Details

Summary

Recent change enable dropping unit-trip loops of "reduction" iterator
type as well. This is fine as long as there is one other "reduction"
iterator in the operation. Without this the initialized value (value
of out) is not read which leads to a correctness issue.

Also fix a bug in the fill -> tensor_reshape folding. The out
operand of the fill needs to be reshaped to get the out operand of
the generated fill operation.

Diff Detail