Skip to content

Commit

Permalink
Remove high level optimization warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Mar 15, 2024
1 parent 402db16 commit 4edf1ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
12 changes: 0 additions & 12 deletions numba_dpex/kernel_api_impl/spirv/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ def inline_threshold(self, value: int):
)
self._inline_threshold = 0
else:
if value == 3:
warnings.warn(
"Due to an existing compiler bug, setting INLINE_THRESHOLD "
f"to {value} can lead to incorrect code generation on "
"certain devices."
)
self._inline_threshold = value

def _optimize_final_module(self):
Expand All @@ -69,12 +63,6 @@ def _optimize_final_module(self):

# Make optimization level depending on config.DPEX_OPT variable
pmb.opt_level = config.DPEX_OPT
if config.DPEX_OPT > 2:
warnings.warn(
"Setting NUMBA_DPEX_OPT greater than 2 known to cause issues "
+ "related to very aggressive optimizations that leads to "
+ "broken code."
)

pmb.disable_unit_at_a_time = False

Expand Down
20 changes: 0 additions & 20 deletions numba_dpex/tests/misc/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,6 @@ def foo(a):
a[dpex.get_global_id(0)] = 0


def test_opt_warning():
bkp = config.DPEX_OPT
config.DPEX_OPT = 3

with pytest.warns(UserWarning):
dpex.call_kernel(foo, dpex.Range(10), dpnp.arange(10))

config.DPEX_OPT = bkp


def test_inline_threshold_eq_3_warning():
bkp = config.INLINE_THRESHOLD
config.INLINE_THRESHOLD = 3

with pytest.warns(UserWarning):
dpex.call_kernel(foo, dpex.Range(10), dpnp.arange(10))

config.INLINE_THRESHOLD = bkp


def test_inline_threshold_negative_val_warning_():
bkp = config.INLINE_THRESHOLD
config.INLINE_THRESHOLD = -1
Expand Down

0 comments on commit 4edf1ce

Please sign in to comment.