-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Description
When extending SparseCompiler integrations tests to run via SVE codegen (see https://reviews.llvm.org/D143514 and https://reviews.llvm.org/D121304), we effectively duplicated many of the RUN lines.
More specifically, if the MLIR_RUN_ARM_SVE_TESTS
CMake flag is disabled, the following RUN lines are effectively identical (they verify similar code-path):
llvm-project/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
Lines 15 to 16 in 6a4e9cc
// REDEFINE: %{option} = "enable-runtime-library=false enable-buffer-initialization=true vl=2 reassociate-fp-reductions=true enable-index-optimizations=true" // RUN: %{compile} | %{run} llvm-project/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
Lines 20 to 27 in 4c72266
// REDEFINE: %{option} = "enable-runtime-library=false vl=4 enable-buffer-initialization=true reassociate-fp-reductions=true enable-index-optimizations=true enable-arm-sve=%ENABLE_VLA" // REDEFINE: %{run} = %lli \ // REDEFINE: --entry-function=entry_lli \ // REDEFINE: --extra-module=%S/Inputs/main_for_lli.ll \ // REDEFINE: %VLA_ARCH_ATTR_OPTIONS \ // REDEFINE: --dlopen=%mlir_native_utils_lib_dir/libmlir_c_runner_utils%shlibext | \ // REDEFINE: FileCheck %s // RUN: %{compile} | mlir-translate -mlir-to-llvmir | %{run}
We should avoid this. My suggestion would be to replace both RUN
lines with RUN line 2. above. Additionally, we should make sure that there are public buildbots that
- set MLIR_RUN_ARM_SVE_TESTS to
On
(e.g. clang-aarch64-sve-vla - set MLIR_RUN_ARM_SVE_TESTS to
Off
(that's the default, so any buildbot running MLIR integration tests should be fine, e.g. mlir-rocm-mi200
This way we will be making sure that all configurations are tested, but there is not code duplication in tests. WDYT?
CC @aartbik
-Andrzej