Skip to content

Commit 2032e47

Browse files
committed
Revert max spirv version to 1.0
1 parent a421647 commit 2032e47

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

numba_dpex/spirv_generator.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ def generate(self, llvm_spirv_args, ipath, opath):
7676
llvm_spirv_flags.append("--spirv-debug-info-version=ocl-100")
7777

7878
if not config.NATIVE_FP_ATOMICS:
79-
llvm_spirv_args = ["--spirv-max-version", "1.4"] + llvm_spirv_args
79+
# Do NOT upgrade version unless you are 100% confident. Not all
80+
# kernel outputs can be converted to higher version of spirv.
81+
# That results in different spirv file versions. As next step
82+
# requires linking of the result file and
83+
# numba_dpex/ocl/atomics/atomic_ops.spir it will raise an error
84+
# that two spirv files have different version and can't be linked
85+
llvm_spirv_args = ["--spirv-max-version", "1.0"] + llvm_spirv_args
8086
llvm_spirv_tool = self._llvm_spirv()
8187

8288
if config.DEBUG:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def spirv_compile():
107107
spirv_args = [
108108
_llvm_spirv(),
109109
"--spirv-max-version",
110-
"1.4",
110+
"1.0",
111111
"numba_dpex/ocl/atomics/atomic_ops.bc",
112112
"-o",
113113
"numba_dpex/ocl/atomics/atomic_ops.spir",

0 commit comments

Comments
 (0)