[Mlir-commits] [mlir] [mlir][test] Make SME e2e tests require an emulator (PR #86489)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Mar 25 04:16:54 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-linalg

Author: Andrzej WarzyƄski (banach-space)

<details>
<summary>Changes</summary>

Integration tests for ArmSME require an emulator (there's no hardware
available). Disable the tests when an emulator is not available.

I'm also adding a note in the docs for future reference.


---
Full diff: https://github.com/llvm/llvm-project/pull/86489.diff


3 Files Affected:

- (modified) mlir/docs/Dialects/ArmSME.md (+8) 
- (modified) mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/lit.local.cfg (+4) 
- (modified) mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg (+4) 


``````````diff
diff --git a/mlir/docs/Dialects/ArmSME.md b/mlir/docs/Dialects/ArmSME.md
index 7326150bcd1156..66f62d07a78545 100644
--- a/mlir/docs/Dialects/ArmSME.md
+++ b/mlir/docs/Dialects/ArmSME.md
@@ -14,6 +14,14 @@ integration tests for reference:
 * [Linalg/CPU/ArmSME/matmul.mlir](https://github.com/llvm/llvm-project/blob/main/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/matmul.mlir)
 * [Vector/CPU/ArmSME/test-outerproduct-f64.mlir](https://github.com/llvm/llvm-project/blob/main/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/test-outerproduct-f64.mlir)
 
+In order to run ArmSME integration tests, include these flags in the CMake
+invokation when configuring LLVM and MLIR:
+```bash
+  -DMLIR_INCLUDE_INTEGRATION_TESTS=On
+  -DMLIR_RUN_ARM_SME_TESTS=On
+  -DARM_EMULATOR_EXECUTABLE=<path-to-emulator> 
+```
+
 These tests are run "post-commit" by the
 [clang-aarch64-sve-vla](https://lab.llvm.org/buildbot/#/builders/197) LLVM
 BuildBot worker.
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/lit.local.cfg b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/lit.local.cfg
index 296b4419438e8a..083574b1af74d4 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/lit.local.cfg
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/lit.local.cfg
@@ -4,6 +4,10 @@ import sys
 if not config.mlir_run_arm_sme_tests:
     config.unsupported = True
 
+# With no hardware available, ArmSME tests require emulation.
+if not config.arm_emulator_executable:
+    config.unsupported = True
+
 # No JIT on win32.
 if sys.platform == "win32":
     config.unsupported = True
diff --git a/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg
index 296b4419438e8a..083574b1af74d4 100644
--- a/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg
+++ b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/lit.local.cfg
@@ -4,6 +4,10 @@ import sys
 if not config.mlir_run_arm_sme_tests:
     config.unsupported = True
 
+# With no hardware available, ArmSME tests require emulation.
+if not config.arm_emulator_executable:
+    config.unsupported = True
+
 # No JIT on win32.
 if sys.platform == "win32":
     config.unsupported = True

``````````

</details>


https://github.com/llvm/llvm-project/pull/86489


More information about the Mlir-commits mailing list