Skip to content

Commit

Permalink
Add docstring and references to open issues for FIXME/TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
Diptorup Deb committed Nov 2, 2023
1 parent 731b20d commit 199183c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions numba_dpex/experimental/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# SPDX-License-Identifier: Apache-2.0

""" The set of experimental decorators provided by numba_dpex that are not yet
ready to move to numba_dpex.core.
"""
import inspect

from numba.core import sigutils
Expand Down
17 changes: 15 additions & 2 deletions numba_dpex/experimental/kernel_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@ def _compile_cached(


class KernelDispatcher(Dispatcher):
"""Dispatcher class designed to compile kernel decorated functions. The
dispatcher inherits the Numba Dispatcher class, but has a different
compilation strategy. Instead of compiling a kernel decorated function to
an executable binary, the dispatcher compiles it to SPIR-V and then caches
that SPIR-V bitcode.
FIXME: Fix issues identified by pylint with this class.
https://github.com/IntelPython/numba-dpex/issues/1196
"""

targetdescr = dpex_kernel_target
_fold_args = False

Expand Down Expand Up @@ -293,8 +304,9 @@ def cb_llvm(dur):
if existing is not None:
return existing

# FIXME: Enable caching
# Add code to enable on disk caching of a binary spirv kernel
# TODO: Enable caching
# Add code to enable on disk caching of a binary spirv kernel.
# Refer: https://github.com/IntelPython/numba-dpex/issues/1197
self._cache_misses[sig] += 1
ev_details = {
"dispatcher": self,
Expand All @@ -317,6 +329,7 @@ def folded(args, kws):
self.add_overload(kcres.cres_or_error)

# TODO: enable caching of kernel_module
# https://github.com/IntelPython/numba-dpex/issues/1197

return kcres.entry_point

Expand Down
3 changes: 2 additions & 1 deletion numba_dpex/tests/experimental/test_exec_queue_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def test_successful_execution_queue_inference():
r = Range(100)

# FIXME: This test fails unexpectedly if the NUMBA_CAPTURED_ERRORS is set
# to "new_style"
# to "new_style".
# Refer: https://github.com/IntelPython/numba-dpex/issues/1195
try:
exp_dpex.call_kernel(add, r, a, b, c)
except:
Expand Down

0 comments on commit 199183c

Please sign in to comment.