From e13c3945a83ffab14a29d5291f1b20966d1c78d4 Mon Sep 17 00:00:00 2001 From: Luke Hutton Date: Thu, 25 Apr 2024 20:35:44 +0000 Subject: [PATCH 1/2] [CI] Use LLVM17 for tests on `ci_cpu` Changes the config script to build TVM with LLVM17. This enables tests for #16921. Change-Id: Ibfba153c7c9bb399d22d9ad6bd6569c59a1d5648 --- tests/scripts/task_config_build_cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/task_config_build_cpu.sh b/tests/scripts/task_config_build_cpu.sh index 0d6c0e2cae46..f509aad30627 100755 --- a/tests/scripts/task_config_build_cpu.sh +++ b/tests/scripts/task_config_build_cpu.sh @@ -29,7 +29,7 @@ echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake echo set\(USE_PROFILER ON\) >> config.cmake echo set\(USE_DNNL ON\) >> config.cmake echo set\(USE_ARM_COMPUTE_LIB ON\) >> config.cmake -echo set\(USE_LLVM \"/usr/bin/llvm-config-15 --link-static\"\) >> config.cmake +echo set\(USE_LLVM \"/usr/bin/llvm-config-17 --link-static\"\) >> config.cmake echo set\(USE_NNPACK ON\) >> config.cmake echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake echo set\(USE_ANTLR ON\) >> config.cmake From f81459e92a842ff020fe4b083ed63e8acdc7340e Mon Sep 17 00:00:00 2001 From: Luke Hutton Date: Fri, 26 Apr 2024 10:39:02 +0000 Subject: [PATCH 2/2] Skip test case that does not produce vectorized code 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. Change-Id: I2642dc702aa63eb4d150fa7f3a996cbd0c7ee81f --- tests/python/relay/test_op_level2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/python/relay/test_op_level2.py b/tests/python/relay/test_op_level2.py index 399f8556e09e..78da144e54bf 100644 --- a/tests/python/relay/test_op_level2.py +++ b/tests/python/relay/test_op_level2.py @@ -1750,6 +1750,16 @@ def assembly( data_layout, kernel_layout, ): + if ( + input_channels == 17 + and output_channels == 29 + and target == "llvm -mcpu=x86-64" + and tvm.target.codegen.llvm_version_major() in [16, 17] + ): + pytest.skip( + "Non divisible dims does not produce vectorized code when 15 < LLVM Version < 18." + ) + input_dtype, weight_dtype, output_dtype = dtypes image_size = (64, 64)