This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ArmSME] Lower loads/stores of (.Q) 128-bit tiles to intrinsics
ClosedPublic

Authored by benmxwl-arm on Aug 21 2023, 5:22 AM.

Details

Summary

This follows from D155306.

Loads and stores of 128-bit tiles have been confirmed to work in the
load-store-128-bit-tile.mlir integration test. However, there is
currently a bug in QEMU (see: https://gitlab.com/qemu-project/qemu/-/issues/1833)
which means this test produces incorrect results (a patch for this issue
is available but not yet in any released version of QEMU). Until a
fixed version of QEMU is available the integration test is expected to fail.

Diff Detail

Event Timeline

benmxwl-arm created this revision.Aug 21 2023, 5:22 AM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
benmxwl-arm requested review of this revision.Aug 21 2023, 5:22 AM
c-rhodes accepted this revision.Aug 21 2023, 6:00 AM

I've left a few minor comments but otherwise LGTM, thanks Ben!

mlir/test/Dialect/ArmSME/vector-ops-to-llvm.mlir
223–224

nit: vertically align

383–385

nit: vertically align

mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
18–19

I wonder if XFAIL would make more sense since it will alert us when QEMU starts behaving correctly?

41

nit: naming

58

nit: MLIR comments use two slashes

64

nit: missing grammar

65–66

missing memref.dealloc (in the other tests I used memref.alloca instead, no strong preference either way)

71–72

It's not clear what the rationale for using i8s is, please could you clarify this in a comment?

This revision is now accepted and ready to land.Aug 21 2023, 6:00 AM
awarzynski accepted this revision.Aug 21 2023, 6:48 AM

LGTM, ta!

mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
58

[nit] "128-bit tile" could be read as "the size of this tile is 128 bit". Perhaps something like `128-bit tile, e.g. ZA{n}.q, in bytes" instead?

  • Address various nits :)
benmxwl-arm marked 8 inline comments as done.Aug 21 2023, 7:24 AM
benmxwl-arm added inline comments.
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
58

The triple slashes are a practice copied from elsewhere in LLVM to distinguish between CHECK/RUN comments and normal comments :)

c-rhodes added inline comments.Aug 21 2023, 7:32 AM
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
58

The triple slashes are a practice copied from elsewhere in LLVM to distinguish between CHECK/RUN comments and normal comments :)

Wasnt aware of that, I figured it was Doxygen hangover, thanks for clarifying!

awarzynski added inline comments.Aug 21 2023, 7:42 AM
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
58

Same. I don't mind what we use, but lets try to be consistent ;-)

benmxwl-arm edited the summary of this revision. (Show Details)Aug 21 2023, 9:31 AM
dcaballe added inline comments.Aug 21 2023, 11:15 PM
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
11

Just my opinion here, feel free to ignore: I would recommend keeping the run command as simple as possible or, at least, as easy to copy-paste as possible. When a test fails and we want to quickly repro/debug locally, copy-pasting multiple lines and remove all the surrounding decoration is not very exciting :)

benmxwl-arm added inline comments.Aug 22 2023, 10:21 AM
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
11

To run/debug locally I do:

./bin/llvm-lit <path-to-test> -va

This will echo the commands lit is running, after they've been expanded and made into single liners. I find this easier than trying to copy them from the tests themselves (which vary a lot) :)

awarzynski added inline comments.Aug 22 2023, 10:42 AM
mlir/test/Integration/Dialect/Vector/CPU/ArmSME/load-store-128-bit-tile.mlir
11

I also like this style and like Ben use -va when I need something that I can copy & paste to re-run. I find that much more convenient than copying things from a test file - all the variables (including filenames) get expanded for you auto-magically :)