LLVM version mismatch between CI CPU and GPU

@tqchen

Is there any specific reason that LLVM version is different between CPU and GPU build?

GPU

[build-gpu] Running shell script

+ mkdir -p build

+ cd build

+ cp ../cmake/config.cmake .

+ echo 'set(USE_CUBLAS' 'ON)'

+ echo 'set(USE_CUDNN' 'ON)'

+ echo 'set(USE_CUDA' 'ON)'

+ echo 'set(USE_OPENGL' 'ON)'

+ echo 'set(USE_MICRO' 'ON)'

+ echo 'set(USE_LLVM' 'llvm-config-7)'

+ echo 'set(USE_NNPACK' 'ON)'

+ echo 'set(NNPACK_PATH' '/NNPACK/build/)'

+ echo 'set(USE_RPC' 'ON)'

+ echo 'set(USE_SORT' 'ON)'

+ echo 'set(USE_GRAPH_RUNTIME' 'ON)'

+ echo 'set(USE_STACKVM_RUNTIME' 'ON)'

+ echo 'set(USE_GRAPH_RUNTIME_DEBUG' 'ON)'

+ echo 'set(USE_VM_PROFILER' 'ON)'

+ echo 'set(USE_ANTLR' 'ON)'

+ echo 'set(USE_BLAS' 'openblas)'

+ echo 'set(CMAKE_CXX_COMPILER' 'g++)'

+ echo 'set(CMAKE_CXX_FLAGS' '-Werror)'

CPU

[build-cpu] Running shell script

+ mkdir -p build

+ cd build

+ cp ../cmake/config.cmake .

+ echo 'set(USE_SORT' 'ON)'

+ echo 'set(USE_MICRO' 'ON)'

+ echo 'set(USE_GRAPH_RUNTIME_DEBUG' 'ON)'

+ echo 'set(USE_VM_PROFILER' 'ON)'

+ echo 'set(USE_LLVM' 'llvm-config-8)'

+ echo 'set(USE_NNPACK' 'ON)'

+ echo 'set(NNPACK_PATH' '/NNPACK/build/)'

+ echo 'set(USE_ANTLR' 'ON)'

+ echo 'set(CMAKE_CXX_COMPILER' 'g++)'

+ echo 'set(CMAKE_CXX_FLAGS' '-Werror)'

+ echo 'set(HIDE_PRIVATE_SYMBOLS' 'ON)'

This is intentional to increase our cross coverage over llvm versions, cpu GPU and i386 uses different version of llvm

Ah I see. That makes sense.

Ok, I am having a new problem in https://github.com/dmlc/tvm/pull/4123

I am trying to enable LLVM cascadelake flag support. I did a LLVM intrinsic codegen lookup. It passes for LLVM 7.0. But, ‘cascadelake’ flag is not defined for LLVM 7.0

So, we need a method to skip tests if LLVM does not support an mcpu flag. I will search if there is a LLVM query for this.