diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt --- a/mlir/test/CMakeLists.txt +++ b/mlir/test/CMakeLists.txt @@ -28,6 +28,7 @@ option(MLIR_RUN_X86VECTOR_TESTS "Run X86Vector tests.") option(MLIR_RUN_CUDA_TENSOR_CORE_TESTS "Run CUDA Tensor core WMMA tests.") option(MLIR_RUN_CUDA_SM80_TESTS "Run CUDA A100 tests.") + option(MLIR_RUN_CUDA_SM80_LT_TESTS "Run CUDA A100 structured sparsity tests.") option(MLIR_RUN_ARM_SVE_TESTS "Run Arm SVE tests.") option(MLIR_RUN_ARM_SME_TESTS "Run Arm SME tests.") @@ -37,6 +38,18 @@ message(FATAL_ERROR "MLIR_INCLUDE_INTEGRATION_TESTS requires a native target") endif() + # When the Integration tests are requested via the MLIR_INCLUDE_INTEGRATION_TESTS + # configuration flag, we automatically include sm80 tests when build for + # cuSparse when the configuration flag MLIR_ENABLE_CUDA_CUSPARSE is set and + # include sm80 lt tests when the MLIR_ENABLE_CUDA_CUSPARSELT is set in + # addition to those. + if (MLIR_ENABLE_CUDA_CUSPARSE) + set(MLIR_RUN_CUDA_SM80_TESTS ON) + if (MLIR_ENABLE_CUDA_CUSPARSELT) + set(MLIR_RUN_CUDA_SM80_LT_TESTS ON) + endif() + endif() + endif() llvm_canonicalize_cmake_booleans( @@ -55,6 +68,7 @@ MLIR_RUN_ARM_SVE_TESTS MLIR_RUN_ARM_SME_TESTS MLIR_RUN_CUDA_SM80_TESTS + MLIR_RUN_CUDA_SM80_LT_TESTS ) configure_lit_site_cfg( diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/lit.local.cfg b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/lit.local.cfg new file mode 100644 --- /dev/null +++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/lit.local.cfg @@ -0,0 +1,2 @@ +if not config.enable_cuda_runner or not config.mlir_run_cuda_sm80_tests or not config.mlir_run_cuda_sm80_lt_tests: + config.unsupported = True diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-matmul-2-4-lib.mlir b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir rename from mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-matmul-2-4-lib.mlir rename to mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir 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 @@ -41,6 +41,7 @@ config.mlir_run_riscv_vector_tests = "@MLIR_RUN_RISCV_VECTOR_TESTS@" config.mlir_run_cuda_tensor_core_tests = @MLIR_RUN_CUDA_TENSOR_CORE_TESTS@ config.mlir_run_cuda_sm80_tests = @MLIR_RUN_CUDA_SM80_TESTS@ +config.mlir_run_cuda_sm80_lt_tests = @MLIR_RUN_CUDA_SM80_LT_TESTS@ config.mlir_include_integration_tests = @MLIR_INCLUDE_INTEGRATION_TESTS@ config.arm_emulator_executable = "@ARM_EMULATOR_EXECUTABLE@" config.arm_emulator_options = "@ARM_EMULATOR_OPTIONS@" diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel @@ -49,6 +49,7 @@ "@MLIR_RUN_X86VECTOR_TESTS@": "0", "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@": "0", "@MLIR_RUN_CUDA_SM80_TESTS@": "0", + "@MLIR_RUN_CUDA_SM80_LT_TESTS@": "0", "@MLIR_INCLUDE_INTEGRATION_TESTS@": "0", "@SHLIBDIR@": package_path("//llvm:BUILD"), },