Skip to content

Commit

Permalink
Revert max spirv version to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Jul 18, 2023
1 parent a421647 commit 2032e47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion numba_dpex/spirv_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ def generate(self, llvm_spirv_args, ipath, opath):
llvm_spirv_flags.append("--spirv-debug-info-version=ocl-100")

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

if config.DEBUG:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def spirv_compile():
spirv_args = [
_llvm_spirv(),
"--spirv-max-version",
"1.4",
"1.0",
"numba_dpex/ocl/atomics/atomic_ops.bc",
"-o",
"numba_dpex/ocl/atomics/atomic_ops.spir",
Expand Down

0 comments on commit 2032e47

Please sign in to comment.