[Mlir-commits] [mlir] [mlir][Examples] Do not run `test.wheel.toy` by default (PR #163009)

Jakub Kuderski llvmlistbot at llvm.org
Sat Oct 11 09:50:09 PDT 2025


https://github.com/kuhar created https://github.com/llvm/llvm-project/pull/163009

This test takes ~16s to execute on my machine, which is an order of magnitude longer than any other mlir test. Put the `test.wheel.toy` test behind a `requires` check for expensive checks.

LLVM already has some tests enabled conditionally under expensive checks.

>From 4d8ca250d33bd5e8d3341429146bb3a9c7917773 Mon Sep 17 00:00:00 2001
From: Jakub Kuderski <jakub at nod-labs.com>
Date: Sat, 11 Oct 2025 12:46:17 -0400
Subject: [PATCH] [mlir][Examples] Do not run `test.wheel.toy` by default

This test takes ~16s to execute on my machine, which is an order of
magnitude longer than any other mlir test. Put the `test.wheel.toy`
test behind a `requires` check for expensive checks.

LLVM already has some tests enabled conditionally under expensive
checks.
---
 mlir/test/Examples/standalone/test.wheel.toy | 1 +
 mlir/test/lit.cfg.py                         | 3 +++
 mlir/test/lit.site.cfg.py.in                 | 1 +
 3 files changed, 5 insertions(+)

diff --git a/mlir/test/Examples/standalone/test.wheel.toy b/mlir/test/Examples/standalone/test.wheel.toy
index 5ff927129793b..c8d188a3cacd0 100644
--- a/mlir/test/Examples/standalone/test.wheel.toy
+++ b/mlir/test/Examples/standalone/test.wheel.toy
@@ -2,6 +2,7 @@
 # than 255 chars when combined with the fact that pip wants to install into a tmp directory buried under
 # C/Users/ContainerAdministrator/AppData/Local/Temp.
 # UNSUPPORTED: target={{.*(windows).*}}
+# REQUIRES: expensive_checks
 # REQUIRES: non-shared-libs-build
 # REQUIRES: bindings-python
 
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index f99c24d6e299a..6ff12d66523f5 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -348,6 +348,9 @@ def find_real_python_interpreter():
 else:
     config.available_features.add("noasserts")
 
+if config.expensive_checks:
+    config.available_features.add("expensive_checks")
+
 def have_host_jit_feature_support(feature_name):
     mlir_runner_exe = lit.util.which("mlir-runner", config.mlir_tools_dir)
 
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
index 1aaf7989e3ce5..91a71aff0381c 100644
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -11,6 +11,7 @@ config.llvm_shlib_ext = "@SHLIBEXT@"
 config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
 config.python_executable = "@Python3_EXECUTABLE@"
 config.enable_assertions = @ENABLE_ASSERTIONS@
+config.expensive_checks = "@EXPENSIVE_CHECKS@"
 config.native_target = "@LLVM_NATIVE_ARCH@"
 config.host_os = "@HOST_OS@"
 config.host_cc = "@HOST_CC@"



More information about the Mlir-commits mailing list