Skip to content

Commit

Permalink
[CI] Move ci-cpu to use llvm-11 (apache#7541)
Browse files Browse the repository at this point in the history
* [CI] Move ci-cpu to use llvm-11

* Fix the testcase of x86 codegen by relax the register names.
  • Loading branch information
tqchen authored and Lokiiiiii committed Mar 2, 2021
1 parent 9f2dbd2 commit 3e1e157
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions tests/python/unittest/test_target_codegen_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,14 @@ def fp16_to_fp32(target, width, match=None, not_match=None):
not_matches = [l for l in assembly if re.search(not_match, l)]
assert not not_matches

fp16_to_fp32(
"llvm -mcpu=skylake-avx512", 15, match="vcvtph2ps.*ymm", not_match="vcvtph2ps.*zmm"
)
fp16_to_fp32("llvm -mcpu=skylake-avx512", 16, match="vcvtph2ps.*zmm")
fp16_to_fp32("llvm -mcpu=skylake-avx512", 17, match="vcvtph2ps.*zmm")
fp16_to_fp32("llvm -mcpu=skylake-avx512", 49, match="vcvtph2ps.*zmm")
fp16_to_fp32(
"llvm -mcpu=skylake-avx512 -mattr=-avx512f",
49,
match="vcvtph2ps.*ymm",
not_match="vcvtph2ps.*zmm",
)
fp16_to_fp32("llvm -mcpu=skylake-avx512", 15, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=skylake-avx512", 16, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=skylake-avx512", 17, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=skylake-avx512", 49, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=skylake-avx512 -mattr=-avx512f", 49, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=skylake-avx512 -mattr=-f16c,-avx512f", 49, not_match="vcvtph2ps")
fp16_to_fp32("llvm -mcpu=core-avx2", 8, match="vcvtph2ps.*ymm")
fp16_to_fp32("llvm -mcpu=core-avx2", 9, match="vcvtph2ps.*ymm")
fp16_to_fp32("llvm -mcpu=core-avx2", 8, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm -mcpu=core-avx2", 9, match="vcvtph2ps.*mm")
fp16_to_fp32("llvm", 9, not_match="vcvtph2ps")


Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/task_config_build_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo set\(USE_GRAPH_RUNTIME_DEBUG ON\) >> config.cmake
echo set\(USE_VM_PROFILER ON\) >> config.cmake
echo set\(USE_DNNL_CODEGEN ON\) >> config.cmake
echo set\(USE_ARM_COMPUTE_LIB ON\) >> config.cmake
echo set\(USE_LLVM llvm-config-10\) >> config.cmake
echo set\(USE_LLVM llvm-config-11\) >> config.cmake
echo set\(USE_NNPACK ON\) >> config.cmake
echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake
echo set\(USE_ANTLR ON\) >> config.cmake
Expand Down

0 comments on commit 3e1e157

Please sign in to comment.