Skip to content

Commit 2d7663c

Browse files
authored
[CI] Use LLVM17 for tests on ci_cpu (#16931)
Changes the config script to build TVM with LLVM17. This enables tests for #16921. There was a failing codegen test when updating to LLVM 17, it seems it stopped producing vectorized code with LLVM 16. I have checked the same test with LLVM 18 and it now correctly produces vectorized code. I made an attempt to track down the commit that fixed the issue in LLVM but didn't have any success. Therefore, I think the best solution is to skip the test until a more recent version of LLVM is used in CI.
1 parent e10cdc5 commit 2d7663c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tests/python/relay/test_op_level2.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,16 @@ def assembly(
17501750
data_layout,
17511751
kernel_layout,
17521752
):
1753+
if (
1754+
input_channels == 17
1755+
and output_channels == 29
1756+
and target == "llvm -mcpu=x86-64"
1757+
and tvm.target.codegen.llvm_version_major() in [16, 17]
1758+
):
1759+
pytest.skip(
1760+
"Non divisible dims does not produce vectorized code when 15 < LLVM Version < 18."
1761+
)
1762+
17531763
input_dtype, weight_dtype, output_dtype = dtypes
17541764

17551765
image_size = (64, 64)

tests/scripts/task_config_build_cpu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake
2929
echo set\(USE_PROFILER ON\) >> config.cmake
3030
echo set\(USE_DNNL ON\) >> config.cmake
3131
echo set\(USE_ARM_COMPUTE_LIB ON\) >> config.cmake
32-
echo set\(USE_LLVM \"/usr/bin/llvm-config-15 --link-static\"\) >> config.cmake
32+
echo set\(USE_LLVM \"/usr/bin/llvm-config-17 --link-static\"\) >> config.cmake
3333
echo set\(USE_NNPACK ON\) >> config.cmake
3434
echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake
3535
echo set\(USE_ANTLR ON\) >> config.cmake

0 commit comments

Comments
 (0)