[Mlir-commits] [mlir] e7afa23 - [mlir] Use 'native' instead of 'llvm_has_native_target' in the mlir tests

Stella Stamenova llvmlistbot at llvm.org
Mon May 23 12:38:45 PDT 2022


Author: Stella Stamenova
Date: 2022-05-23T12:38:24-07:00
New Revision: e7afa23366f5f94be968f84fb9ef14fe7156135b

URL: https://github.com/llvm/llvm-project/commit/e7afa23366f5f94be968f84fb9ef14fe7156135b
DIFF: https://github.com/llvm/llvm-project/commit/e7afa23366f5f94be968f84fb9ef14fe7156135b.diff

LOG: [mlir] Use 'native' instead of 'llvm_has_native_target' in the mlir tests

The tests actually require the target triple to match the host, rather than just having the host in the list of available targets. This change removes `llvm_has_native_target` and instead uses the `native` feature from the lit configuration.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D126011

Added: 
    

Modified: 
    mlir/test/CAPI/execution_engine.c
    mlir/test/lit.cfg.py
    mlir/test/mlir-cpu-runner/lit.local.cfg
    mlir/test/python/execution_engine.py

Removed: 
    


################################################################################
diff  --git a/mlir/test/CAPI/execution_engine.c b/mlir/test/CAPI/execution_engine.c
index dc9ef4b6841cb..7420af463b855 100644
--- a/mlir/test/CAPI/execution_engine.c
+++ b/mlir/test/CAPI/execution_engine.c
@@ -9,8 +9,8 @@
 
 /* RUN: mlir-capi-execution-engine-test 2>&1 | FileCheck %s
  */
-/* REQUIRES: llvm_has_native_target
-*/
+/* REQUIRES: native
+ */
 
 #include "mlir-c/Conversion.h"
 #include "mlir-c/ExecutionEngine.h"

diff  --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index 3a2e2815e04e0..1d009afe99729 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -110,12 +110,6 @@
 # it can be explicitly opted-in by prefixing the variable name with $
 config.environment['FILECHECK_OPTS'] = "-enable-var-scope --allow-unused-prefixes=false"
 
-
-if config.native_target in config.targets_to_build:
-    config.available_features.add('llvm_has_native_target')
-
-
-
 # Add the python path for both the source and binary tree.
 # Note that presently, the python sources come from the source tree and the
 # binaries come from the build tree. This should be unified to the build tree

diff  --git a/mlir/test/mlir-cpu-runner/lit.local.cfg b/mlir/test/mlir-cpu-runner/lit.local.cfg
index 7dc3525ae0aef..5951990786b68 100644
--- a/mlir/test/mlir-cpu-runner/lit.local.cfg
+++ b/mlir/test/mlir-cpu-runner/lit.local.cfg
@@ -8,7 +8,7 @@ if sys.platform == 'win32':
 if 'msan' in config.available_features:
   config.unsupported = True
 
-# Requires the native target to be configured in.
-if 'llvm_has_native_target' not in config.available_features:
+# Requires native execution.
+if 'native' not in config.available_features:
     config.unsupported = True
 

diff  --git a/mlir/test/python/execution_engine.py b/mlir/test/python/execution_engine.py
index 1093846d3e7b1..5eb0dffdc8456 100644
--- a/mlir/test/python/execution_engine.py
+++ b/mlir/test/python/execution_engine.py
@@ -1,5 +1,5 @@
 # RUN: %PYTHON %s 2>&1 | FileCheck %s
-# REQUIRES: llvm_has_native_target
+# REQUIRES: native
 import gc, sys
 from mlir.ir import *
 from mlir.passmanager import *


        


More information about the Mlir-commits mailing list