|
1 | 1 | // DEFINE: %{option} = enable-runtime-library=true
|
2 |
| -// DEFINE: %{command} = mlir-opt %s --sparse-compiler=%{option} | \ |
3 |
| -// DEFINE: mlir-cpu-runner \ |
| 2 | +// DEFINE: %{compile} = mlir-opt %s --sparse-compiler=%{option} |
| 3 | +// DEFINE: %{run} = mlir-cpu-runner \ |
4 | 4 | // DEFINE: -e entry -entry-point-result=void \
|
5 | 5 | // DEFINE: -shared-libs=%mlir_lib_dir/libmlir_c_runner_utils%shlibext,%mlir_lib_dir/libmlir_runner_utils%shlibext | \
|
6 | 6 | // DEFINE: FileCheck %s
|
7 | 7 | //
|
8 |
| -// RUN: %{command} |
| 8 | +// RUN: %{compile} | %{run} |
9 | 9 | //
|
10 | 10 | // Do the same run, but now with direct IR generation.
|
11 | 11 | // REDEFINE: %{option} = "enable-runtime-library=false enable-buffer-initialization=true"
|
12 |
| -// RUN: %{command} |
| 12 | +// RUN: %{compile} | %{run} |
13 | 13 | //
|
14 | 14 | // Do the same run, but now with direct IR generation and vectorization.
|
15 | 15 | // REDEFINE: %{option} = "enable-runtime-library=false enable-buffer-initialization=true vl=2 reassociate-fp-reductions=true enable-index-optimizations=true"
|
16 |
| -// RUN: %{command} |
| 16 | +// RUN: %{compile} | %{run} |
| 17 | + |
| 18 | +// Do the same run, but now with direct IR generation and, if available, VLA |
| 19 | +// vectorization. |
| 20 | +// REDEFINE: %{option} = "enable-runtime-library=false vl=4 enable-arm-sve=%ENABLE_VLA" |
| 21 | +// REDEFINE: %{run} = %lli \ |
| 22 | +// REDEFINE: --entry-function=entry_lli \ |
| 23 | +// REDEFINE: --extra-module=%S/Inputs/main_for_lli.ll \ |
| 24 | +// REDEFINE: %VLA_ARCH_ATTR_OPTIONS \ |
| 25 | +// REDEFINE: --dlopen=%mlir_native_utils_lib_dir/libmlir_c_runner_utils%shlibext --dlopen=%mlir_lib_dir/libmlir_runner_utils%shlibext | \ |
| 26 | +// REDEFINE: FileCheck %s |
| 27 | +// RUN: %{compile} | mlir-translate -mlir-to-llvmir | %{run} |
17 | 28 |
|
18 | 29 | #MAT_C_C = #sparse_tensor.encoding<{dimLevelType = ["compressed", "compressed"]}>
|
19 | 30 | #MAT_D_C = #sparse_tensor.encoding<{dimLevelType = ["dense", "compressed"]}>
|
|
0 commit comments