mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
[mlir] Guard NVPTX backend initialization on it being configured (NFC)
This is just helping with some build failure in some new configurations.
This commit is contained in:
@@ -85,10 +85,12 @@ SerializeToCubinPass::SerializeToCubinPass(StringRef triple, StringRef chip,
|
||||
// is initialized exactly once.
|
||||
llvm::call_once(initializeBackendOnce, []() {
|
||||
// Initialize LLVM NVPTX backend.
|
||||
#if LLVM_HAS_NVPTX_TARGET
|
||||
LLVMInitializeNVPTXTarget();
|
||||
LLVMInitializeNVPTXTargetInfo();
|
||||
LLVMInitializeNVPTXTargetMC();
|
||||
LLVMInitializeNVPTXAsmPrinter();
|
||||
#endif
|
||||
});
|
||||
|
||||
maybeSetOption(this->triple, triple);
|
||||
|
||||
Reference in New Issue
Block a user