This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][ArmSME] Initial implementation of ArmSME Dialect
AbandonedPublic

Authored by WanderAway on Dec 12 2022, 12:22 PM.

Details

Summary

Here is the initial implementation of the ArmSME dialect.

The Scalable Matrix Extension (SME) is an extension to SVE (scalable vector extension) for aarch64, and focuses on outer product instructions to accelerate matrix multiplies by utilizing a 2D tile register (ZA), which is split into multiple smaller square tiles (ZA[0-3]s, ZA[0-7]d).

More information on the architecture itself can be found here.

Currently this patch defines most of the instructions defined by the extension, but lowering only supports non-widening (aka. fp32 and fp64) versions of MOPA/MOPS op, in addition to the ZERO op.

The implementation of this dialect is heavily influenced by the existing ArmSVE dialect.

The plan is to somehow connect to the vector dialect either through the OuterProductOp or by introducing a MaskedOuterProductOp. Additionally accessing vectors from within the SME tile register should be implemented through the new load/store/move instructions.

Discourse topic here: https://discourse.llvm.org/t/rfc-creating-a-armsme-dialect/67208

Diff Detail

Event Timeline

WanderAway created this revision.Dec 12 2022, 12:22 PM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
WanderAway requested review of this revision.Dec 12 2022, 12:22 PM
WanderAway edited the summary of this revision. (Show Details)Dec 12 2022, 12:25 PM
WanderAway edited the summary of this revision. (Show Details)Dec 12 2022, 12:31 PM
Matt added a subscriber: Matt.Dec 12 2022, 12:32 PM

Added RUN to roundtrip unit test (oops)

Fixing the other dumb RUN mistake

Update mlir-opt command line test to reflect new registered dialect.

ftynse requested changes to this revision.Dec 13 2022, 11:20 PM

Please post an RFC on the forum as described here https://mlir.llvm.org/getting_started/DeveloperGuide/#guidelines-on-contributing-a-new-dialect-or-important-components, the link the RFC from the commit message.

This revision now requires changes to proceed.Dec 13 2022, 11:20 PM
WanderAway edited the summary of this revision. (Show Details)Dec 14 2022, 6:51 AM
peixin added a subscriber: peixin.Jan 5 2023, 7:32 PM
peixin added inline comments.
mlir/include/mlir/Dialect/ArmSME/ArmSME.td
104

typo?

145

typo?

WanderAway retitled this revision from [RFC][MLIR][ArmSME] Initial implementation of ArmSME Dialect to [MLIR][ArmSME] Initial implementation of ArmSME Dialect.Jan 11 2023, 8:20 AM
WanderAway abandoned this revision.Jun 3 2023, 11:10 AM

Going to post a new implementation according to the discussion at https://discourse.llvm.org/t/rfc-creating-a-armsme-dialect/67208