Page MenuHomePhabricator

[mlir][Linalg] Fix TensorConstantOp bufferization in Linalg.

Authored by nicolasvasilache on Oct 13 2020, 5:34 AM.



TensorConstantOp bufferization currently uses the vector dialect to store constant data into memory. Due to natural vector size and alignment properties, this is problematic with n>1-D vectors whose most minor dimension is not naturally aligned.

Instead, this revision linearizes the constant and introduces a linalg.reshape to go back to the desired shape.

Still this is still to be considered a workaround and a better longer term solution will probably involve

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Oct 13 2020, 5:34 AM
ftynse accepted this revision.Oct 13 2020, 9:20 AM
This revision is now accepted and ready to land.Oct 13 2020, 9:20 AM

Update test using correct math ..

This revision was landed with ongoing or failed builds.Oct 13 2020, 9:37 AM
This revision was automatically updated to reflect the committed changes.