diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt --- a/mlir/test/CMakeLists.txt +++ b/mlir/test/CMakeLists.txt @@ -1,17 +1,6 @@ add_subdirectory(CAPI) add_subdirectory(lib) -llvm_canonicalize_cmake_booleans( - MLIR_ENABLE_BINDINGS_PYTHON - LLVM_BUILD_EXAMPLES - MLIR_ENABLE_CUDA_CONVERSIONS - MLIR_ENABLE_CUDA_RUNNER - MLIR_ENABLE_ROCM_CONVERSIONS - MLIR_ENABLE_ROCM_RUNNER - MLIR_ENABLE_SPIRV_CPU_RUNNER - MLIR_ENABLE_VULKAN_RUNNER - ) - # Passed to lit.site.cfg.py.so that the out of tree Standalone dialect test # can find MLIR's CMake configuration set(MLIR_CMAKE_DIR @@ -45,6 +34,21 @@ DESTINATION ${MLIR_INTEGRATION_TEST_DIR}/data/) endif() +llvm_canonicalize_cmake_booleans( + LLVM_BUILD_EXAMPLES + MLIR_ENABLE_BINDINGS_PYTHON + MLIR_ENABLE_CUDA_CONVERSIONS + MLIR_ENABLE_CUDA_RUNNER + MLIR_ENABLE_ROCM_CONVERSIONS + MLIR_ENABLE_ROCM_RUNNER + MLIR_ENABLE_SPIRV_CPU_RUNNER + MLIR_ENABLE_VULKAN_RUNNER + MLIR_INCLUDE_INTEGRATION_TESTS + MLIR_RUN_AMX_TESTS + MLIR_RUN_CUDA_TENSOR_CORE_TESTS + MLIR_RUN_X86VECTOR_TESTS + ) + configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg @@ -1,7 +1,7 @@ import sys # AMX tests must be enabled via build flag. -if config.mlir_run_amx_tests != 'ON': +if not config.mlir_run_amx_tests: config.unsupported = True # No JIT on win32. diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg @@ -1,7 +1,7 @@ import sys # X86Vector tests must be enabled via build flag. -if config.mlir_run_x86vector_tests != 'ON': +if not config.mlir_run_x86vector_tests: config.unsupported = True # No JIT on win32. diff --git a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg --- a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg +++ b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg @@ -1,5 +1,5 @@ import sys # TensorCore tests must be enabled via build flag. -if config.mlir_run_cuda_tensor_core_tests != 'ON': +if not config.mlir_run_cuda_tensor_core_tests: config.unsupported = True diff --git a/mlir/test/Integration/lit.local.cfg b/mlir/test/Integration/lit.local.cfg --- a/mlir/test/Integration/lit.local.cfg +++ b/mlir/test/Integration/lit.local.cfg @@ -1,2 +1,2 @@ -if config.mlir_include_integration_tests != 'ON': +if not config.mlir_include_integration_tests: config.unsupported = True diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in --- a/mlir/test/lit.site.cfg.py.in +++ b/mlir/test/lit.site.cfg.py.in @@ -48,10 +48,10 @@ config.enable_bindings_python = @MLIR_ENABLE_BINDINGS_PYTHON@ config.mlir_integration_test_dir = "@MLIR_INTEGRATION_TEST_DIR@" config.intel_sde_executable = "@INTEL_SDE_EXECUTABLE@" -config.mlir_run_amx_tests = "@MLIR_RUN_AMX_TESTS@" -config.mlir_run_x86vector_tests = "@MLIR_RUN_X86VECTOR_TESTS@" -config.mlir_run_cuda_tensor_core_tests = "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@" -config.mlir_include_integration_tests = "@MLIR_INCLUDE_INTEGRATION_TESTS@" +config.mlir_run_amx_tests = @MLIR_RUN_AMX_TESTS@ +config.mlir_run_x86vector_tests = @MLIR_RUN_X86VECTOR_TESTS@ +config.mlir_run_cuda_tensor_core_tests = @MLIR_RUN_CUDA_TENSOR_CORE_TESTS@ +config.mlir_include_integration_tests = @MLIR_INCLUDE_INTEGRATION_TESTS@ # Support substitution of the tools_dir with user parameters. This is # used when we can't determine the tool dir at configuration time. diff --git a/mlir/test/python/integration/lit.local.cfg b/mlir/test/python/integration/lit.local.cfg --- a/mlir/test/python/integration/lit.local.cfg +++ b/mlir/test/python/integration/lit.local.cfg @@ -1,2 +1,2 @@ -if config.mlir_include_integration_tests != 'ON': +if not config.mlir_include_integration_tests: config.unsupported = True