aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorAndrzej Warzynski <andrzej.warzynski@arm.com>2023-07-24 19:11:15 +0000
committerAndrzej Warzynski <andrzej.warzynski@arm.com>2023-08-02 20:21:50 +0000
commite77e891d8953b487f5f06bf69225a61ef537f766 (patch)
tree3b42b8d1e0275183b6e836b1a9a5e36158c7208a /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent590d7e2664260d5ceef77be03cdc3564e0f57f72 (diff)
downloadllvm-e77e891d8953b487f5f06bf69225a61ef537f766.zip
llvm-e77e891d8953b487f5f06bf69225a61ef537f766.tar.gz
llvm-e77e891d8953b487f5f06bf69225a61ef537f766.tar.bz2
[mlir][test] Refactor SparseTensor CPU integration tests
SUMMARY OF CHANGES ------------------ This patch aims to reduce test duplication and to improve code re-use in SparseTensor integration tests for CPU. This is a direct follow-up of: 1. https://reviews.llvm.org/D155403 (test duplication), and 2. https://reviews.llvm.org/D155405 (code re-use), The key logic for this patch is implemented in: * SparseTensor/CPU/lit.local.cfg. Essentially, the set-up that used to be repeated across all test files has been extracted into a common LIT configuration file. This makes code re-use straightforward. All SVE/VLA tests are now enabled _conditionally_ and refactored to use `mlir-cpu-runner` rather than `lli`. The former helps with test duplication and the latter with code re-use. A few additional refactoring changes are included. 1. The reduce verbosity, long runtime library names like: %mlir_native_utils_lib_dir/libmlir_c_runner_utils%shlibext are replaced with: %mlir_c_runner_utils 2. In order to keep the code and the comments in sync, and to maintain consistency across the tests, the following: enable-runtime-library=true is swapped with (and vice-versa): enable-runtime-library=false Note that this change won't affect test coverage. Only few tests required such update. 3. A VLS vectorization `RUN` line is added in tests where there was a VLA/VLS `RUN` line, but no VLS `RUN` line (with a few exceptions of tests that only contained one `RUN` line to begin with). 4. A few test variables are renamed/added. Most notable example: * %{options}` --> %{sparse_compiler_opts} TEST RUNTIME IMPROVEMENT ------------------------ Tl;Dr This change improves test execution time by ~25%. At the moment, the following `llvm-lit` invocation takes ~7.30s on my AArch64 workstation (with SVE): llvm-lit <llvm-project>/mlir/test/Integration/Dialect/SparseTensor/CPU/ This timing doesn't change no matter what the value of the following CMake variable is (that should disable some tests): MLIR_RUN_ARM_SVE_TESTS With this patch, the execution time will indeed depend on the value of the above CMake variable: * with `MLIR_RUN_ARM_SVE_TESTS=true` the timing remains intact, * with `MLIR_RUN_ARM_SVE_TESTS=false` the timing drops to ~5.40s (~25% improvement). This is expected: * on average there are 4 `RUN` lines per test, * _without this change_ (and with `MLIR_RUN_ARM_SVE_TESTS=false`) the 4th `RUN` line would in most cases duplicate the 3rd `RUN` line, * _with this change) (and with `MLIR_RUN_ARM_SVE_TESTS=false`) the 4th `RUN` line becomes empty. PATCH SIZE ---------- While rather large and touching many files, most changes in this patch are rather mechanical. All test configurations have been preserved and only in a handful of cases new `RUN` lines added. Differential Revision: https://reviews.llvm.org/D156625
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions