From 0d70bc990bc4b3c90bedd17b6d5b80e35d147524 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 27 Apr 2022 16:04:47 -0700 Subject: [PATCH] [mlir][msan][test] Disable jit tests I am going to enable MLIR test on msan bot https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-msan Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D124574 --- mlir/test/mlir-cpu-runner/lit.local.cfg | 4 ++++ mlir/unittests/ExecutionEngine/Invoke.cpp | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mlir/test/mlir-cpu-runner/lit.local.cfg b/mlir/test/mlir-cpu-runner/lit.local.cfg index 3a9b0ef..7dc3525 100644 --- a/mlir/test/mlir-cpu-runner/lit.local.cfg +++ b/mlir/test/mlir-cpu-runner/lit.local.cfg @@ -4,6 +4,10 @@ import sys if sys.platform == 'win32': config.unsupported = True +# MSAN does not work with JIT. +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: config.unsupported = True diff --git a/mlir/unittests/ExecutionEngine/Invoke.cpp b/mlir/unittests/ExecutionEngine/Invoke.cpp index cc91254..febfbd1 100644 --- a/mlir/unittests/ExecutionEngine/Invoke.cpp +++ b/mlir/unittests/ExecutionEngine/Invoke.cpp @@ -232,7 +232,13 @@ static void memrefMultiply(::StridedMemRefType *memref, elt *= coefficient; } -TEST(NativeMemRefJit, JITCallback) { +// MSAN does not work with JIT. +#if __has_feature(memory_sanitizer) +#define MAYBE_JITCallback DISABLED_JITCallback +#else +#define MAYBE_JITCallback JITCallback +#endif +TEST(NativeMemRefJit, MAYBE_JITCallback) { constexpr int k = 2; constexpr int m = 2; int64_t shape[] = {k, m}; -- 2.7.4