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
Viewing commit d91bef92
Show latest version
1 file
+ 8
0
Preferences
Compare changes
@@ -24,6 +24,13 @@ def _opencl_to_spriv(opencl_code,
@@ -24,6 +24,13 @@ def _opencl_to_spriv(opencl_code,
clspv (https://github.com/google/clspv) ...takes a while to compile
clspv (https://github.com/google/clspv) ...takes a while to compile
 
--cl-std=<value>
 
=CL1.0
 
=CL1.1
 
=CL1.2
 
=CL2.0
 
=CLC++
 
For OpenCL SPIRV (loaded by OpenCL runtime):
For OpenCL SPIRV (loaded by OpenCL runtime):
Tools:
Tools:
@@ -74,6 +81,7 @@ def _opencl_to_spriv(opencl_code,
@@ -74,6 +81,7 @@ def _opencl_to_spriv(opencl_code,
*OCL_FAST_MATH_FLAGS,
*OCL_FAST_MATH_FLAGS,
*(['-cl-single-precision-constant'] if silence_warnings else []),
*(['-cl-single-precision-constant'] if silence_warnings else []),
cl_file,
cl_file,
 
f'-cl-std=CL{opencl_version}',
'-I', get_pystencils_include_path(),
'-I', get_pystencils_include_path(),
'-O3',
'-O3',
*(['-w'] if silence_warnings else []),
*(['-w'] if silence_warnings else []),