Support possibility of neither PTX backend being available
This commit is contained in:
parent
d8461b1d63
commit
bc2c9a24ed
1 changed files with 8 additions and 5 deletions
13
llvm/core.py
13
llvm/core.py
|
|
@ -2169,9 +2169,12 @@ if True: # use PTX?
|
|||
_core.LLVMInitializePTXAsmPrinter()
|
||||
HAS_PTX = True
|
||||
except AttributeError:
|
||||
_core.LLVMInitializeNVPTXTarget()
|
||||
_core.LLVMInitializeNVPTXTargetInfo()
|
||||
_core.LLVMInitializeNVPTXTargetMC()
|
||||
_core.LLVMInitializeNVPTXAsmPrinter()
|
||||
HAS_NVPTX = True
|
||||
try:
|
||||
_core.LLVMInitializeNVPTXTarget()
|
||||
_core.LLVMInitializeNVPTXTargetInfo()
|
||||
_core.LLVMInitializeNVPTXTargetMC()
|
||||
_core.LLVMInitializeNVPTXAsmPrinter()
|
||||
HAS_NVPTX = True
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue