Skip to content

Commit

Permalink
Merge pull request #1056 from IntelPython/spirv_version
Browse files Browse the repository at this point in the history
Upgraded spirv-max-version from 1.1 to 1.4.
  • Loading branch information
Diptorup Deb authored May 26, 2023
2 parents 452d336 + 5e8aa13 commit bc46319
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion numba_dpex/spirv_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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.1"] + llvm_spirv_args
llvm_spirv_args = ["--spirv-max-version", "1.4"] + llvm_spirv_args
llvm_spirv_tool = self._llvm_spirv()

if config.DEBUG:
Expand Down
9 changes: 9 additions & 0 deletions numba_dpex/tests/kernel_tests/test_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
dpnp.float64,
]

skip_on_gpu = pytest.mark.skipif(
dpctl.SyclDevice().device_type == dpctl.device_type.gpu,
reason="skip print on gpu",
)


@pytest.fixture(params=list_of_dtypes)
def input_arrays(request):
Expand All @@ -24,6 +29,7 @@ def input_arrays(request):
return a


@skip_on_gpu
def test_print_scalar_with_string(input_arrays, capfd):
"""Tests if we can print a scalar value with a string."""

Expand All @@ -41,6 +47,7 @@ def print_scalar_val(s):
assert "printing ... 10" in captured.out


@skip_on_gpu
def test_print_scalar(input_arrays, capfd):
"""Tests if we can print a scalar value."""

Expand All @@ -59,6 +66,7 @@ def print_scalar_val(s):
assert "10" in captured.out


@skip_on_gpu
def test_print_only_str(input_arrays):
"""Negative test to capture LoweringError as printing strings is
unsupported.
Expand All @@ -80,6 +88,7 @@ def print_string(a):
print_string[dpex.Range(1)](a)


@skip_on_gpu
def test_print_array(input_arrays):
"""Negative test to capture LoweringError as printing arrays
is unsupported.
Expand Down

0 comments on commit bc46319

Please sign in to comment.