[all-commits] [llvm/llvm-project] c8d138: [mlir][ArmSME] Add tests for Streaming SVE
Cullen Rhodes via All-commits
all-commits at lists.llvm.org
Tue Apr 25 00:52:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8d1388e6c8bd57299d5801f170719218f735c4c
https://github.com/llvm/llvm-project/commit/c8d1388e6c8bd57299d5801f170719218f735c4c
Author: Cullen Rhodes <cullen.rhodes at arm.com>
Date: 2023-04-25 (Tue, 25 Apr 2023)
Changed paths:
M mlir/test/CMakeLists.txt
M mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg
A mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg
A mlir/test/Integration/Dialect/Vector/CPU/ArmSME/test-ssve.mlir
M mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/lit.local.cfg
A mlir/test/Target/LLVMIR/arm-ssve.mlir
M mlir/test/lit.site.cfg.py.in
Log Message:
-----------
[mlir][ArmSME] Add tests for Streaming SVE
This patch adds a couple of tests for targeting Arm Streaming SVE (SSVE)
mode, part of the Arm Scalable Matrix Extension (SME).
SSVE is enabled in the backend at the function boundary by specifying
the `aarch64_pstate_sm_enabled` attribute, as documented here [1]. SSVE
can be targeted from MLIR by specifying this in the passthrough
attributes [2] and compiling with
-mattr=+sme,+sve -force-streaming-compatible-sve
The passthrough will propagate to the backend where `smstart/smstop`
will be emitted around the call to the SSVE function.
The set of legal instructions changes in SSVE,
`-force-streaming-compatible-sve` avoids the use of NEON entirely and
instead lowers to (streaming-compatible) SVE. The behaviour this flag
predicates will be hooked up to the function attribute in the future
such that simply specifying this (should) lead to correct
code-generation.
Two tests are added:
* A basic LLVMIR test verifying the attribute is passed through.
* An integration test calling a SSVE function.
The integration test can be run with QEMU.
[1] https://llvm.org/docs/AArch64SME.html
[2] https://mlir.llvm.org/docs/Dialects/LLVM/#attribute-pass-through
Reviewed By: awarzynski, aartbik
Differential Revision: https://reviews.llvm.org/D148111
More information about the All-commits
mailing list