This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Update lowering of vector ops to llvm intrinsics to use row-major.
ClosedPublic

Authored by nicolasvasilache on Apr 8 2020, 3:22 PM.

Details

Summary

LLVM matrix intrinsics recently introduced an option to support row-major mode.
This matches the MLIR vector model, this revision switches to row-major.

A corner case related to degenerate sizes was also fixed upstream.
This revision removes the guard against this corner case.

A bug was uncovered on the output vector construction which this revision also fixes.

Lastly, this has been tested on a small size and benchmarked independently: no visible performance regression is observed.

In the future, when matrix intrinsics support per op attribute, we can more aggressively translate to that and avoid inserting MLIR-level transposes.

This has been tested independently to work on small matrices.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2020, 3:22 PM
aartbik accepted this revision.Apr 9 2020, 11:08 AM
This revision is now accepted and ready to land.Apr 9 2020, 11:08 AM
This revision was automatically updated to reflect the committed changes.