Commit 635831c7 by Thomas Viehmann Committed by masahi

Require LLVM >= 9 for AMDGPU backend (#4253)

LLVM 8 will crash when loading the bitcodes

This is a runtime check as the file will be compiled in even when
USE_ROCM OFF is used in the configuration if ROCM is installed
in the default location.

Fixes: #4087
parent 411fe277
......@@ -183,6 +183,11 @@ inline int DetectROCMComputeVersion(const std::string& target) {
}
runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
#if TVM_LLVM_VERSION < 90
LOG(FATAL) << "AMDGPU backend requires at least LLVM 9";
// Lower versions will crash when loading the bitcode, see
// issue #4087 for a discussion
#endif
InitializeLLVM();
CHECK(target.length() >= 4 &&
target.substr(0, 4) == "rocm");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment