This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Update SVE integration tests to use mlir-cpu-runner 1/N
ClosedPublic

Authored by awarzynski on Jul 16 2023, 7:46 AM.

Details

Summary

With the recent addition of "-mattr" and "-march" to the list of options
supported by mlir-cpu-runner [1], the SVE integration
tests can be updated to use mlir-cpu-runner instead of lli. This will
allow better code re-use and more consistency

This patch updates 2 tests to demonstrate the new logic. The remaining
tests will be updated in the follow-up patches.

[1] https://reviews.llvm.org/D146917

Depends on D155403

Diff Detail

Event Timeline

awarzynski created this revision.Jul 16 2023, 7:46 AM
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
awarzynski requested review of this revision.Jul 16 2023, 7:46 AM

Reset the changes in concatenate_dim_1.mlir

Matt added a subscriber: Matt.Jul 16 2023, 10:40 AM
awarzynski retitled this revision from [mlir] Update SVE integration tests to use mlir-cpu-runner to [mlir] Update SVE integration tests to use mlir-cpu-runner 1/N.Jul 16 2023, 1:33 PM
awarzynski edited the summary of this revision. (Show Details)

Move the new LIT logic to mlir/test/Integration/lit.local.cfg. This simplifies this patch and allows better code re-use.

jsetoain accepted this revision.Jul 17 2023, 10:40 AM

Looks good to me, and a much cleaner solution!

mlir/test/CMakeLists.txt
25–26

Now that the cpu-runner supports -mattr/-march, we can get rid of this entirely. It's okay if you're waiting for N/N to remove it, just making a note here :-)

This revision is now accepted and ready to land.Jul 17 2023, 10:40 AM
awarzynski added inline comments.Jul 19 2023, 1:31 AM
mlir/test/CMakeLists.txt
25–26

Might take a while to get there 😂 . But lets be optimistic!

Thanks for taking a look :)

cseo added a subscriber: cseo.Jul 20 2023, 7:03 AM

This change seems to be breaking one of the buildbots (https://lab.llvm.org/buildbot/#/builders/179/builds/6704). This is a Neoverse N1, which doesn't have SVE. So I believe this should be checking whether the CPU supports SVE or not.

This change seems to be breaking one of the buildbots (https://lab.llvm.org/buildbot/#/builders/179/builds/6704). This is a Neoverse N1, which doesn't have SVE. So I believe this should be checking whether the CPU supports SVE or not.

Thanks for letting me know and apologies for the disruption. Yes, that bot does not support SVE, but allows us to run SVE tests under emulation. In this patch I forgot to add emulator to the invocation in mlir-cpu-runner. Fixed in: https://github.com/llvm/llvm-project/commit/64466b777bec33f5830c08bacf07b2e30c0ae4a2.

This change seems to be breaking one of the buildbots (https://lab.llvm.org/buildbot/#/builders/179/builds/6704). This is a Neoverse N1, which doesn't have SVE. So I believe this should be checking whether the CPU supports SVE or not.

Apologies, my previous "fix" exposed another missing bit and the bot is still failing :( This should be sufficient: https://reviews.llvm.org/D155920. I tested on a non-SVE machine.