Skip to content
Snippets Groups Projects

WIP: Opencl to SPIR-V ahead-of-time compilation

Closed Stephan Seitz requested to merge seitz/pystencils:opencl-to-spirv into master
Files
4
+ 11
1
@@ -140,7 +140,17 @@ def get_llc_command():
We try if one of the following is in PATH: llc, llc-10, llc-9, llc-8, llc-7, llc-6
"""
candidates = ['llc', 'llc-10', 'llc-9', 'llc-8', 'llc-7', 'llc-6']
candidates = ['llc'] + [f'llc-{i}' for i in range(14, 7, -1)]
found_executables = (e for e in candidates if shutil.which(e))
return next(found_executables, None)
def get_clang_command():
"""Try to get executable for llvm's IR compiler llc
We try if one of the following is in PATH: llc, llc-10, llc-9, llc-8, llc-7, llc-6
"""
candidates = ['clang'] + [f'clang-{i}' for i in range(14, 7, -1)]
found_executables = (e for e in candidates if shutil.which(e))
return next(found_executables, None)
Loading