Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d7f58ed
CUDA Dispatcher: inherit from _DispatcherBase
gmarkall Feb 4, 2022
31c1a64
[WIP] Fix CUDA target tests
gmarkall Feb 4, 2022
d9649f8
Some tidy-up
gmarkall Feb 4, 2022
70dbacd
[WIP] CUDA Dispatcher inherits from uber_Dispatcher
gmarkall Feb 4, 2022
922624f
Wire in target options in CUDA dispatcher
gmarkall Feb 4, 2022
ed2e17a
Delete some dead code
gmarkall Feb 4, 2022
8238610
Remove sigs from cuda dispatcher
gmarkall Feb 4, 2022
53e98fb
Some refactoring
gmarkall Feb 4, 2022
e307e9a
Some renaming to closer align ForAll with reality
gmarkall Feb 4, 2022
703d222
Delete _search_new_conversions and nopython_signatures from CUDA disp…
gmarkall Feb 4, 2022
13aa50b
Remove CUDA Dispatchers disable_compile and add a note to get_call_te…
gmarkall Feb 4, 2022
a11269e
Clarify comment on CUDA Compile Result
gmarkall Feb 4, 2022
18c553f
Remove duplication in compile_result functions
gmarkall Feb 4, 2022
3ebcf26
Refactor / tidy up decorators.py
gmarkall Feb 4, 2022
4f5b361
Rename CUDA dispatcher to CUDADispatcher
gmarkall Feb 4, 2022
078f2d9
Clarify some comments
gmarkall Feb 4, 2022
778f7e2
Fix ref to CUDADispatcher in docs
gmarkall Feb 4, 2022
5d6384c
CUDA Dispatcher: use default finalizer
gmarkall Feb 4, 2022
4d9cff7
Add test for Issue #5902
gmarkall Feb 4, 2022
c136220
Merge remote-tracking branch 'numba/main' into cuda-dispatcher-base-2…
gmarkall Feb 8, 2022
ef5b4dc
Fix typos (PR #7815 review)
gmarkall Feb 11, 2022
499623f
Fix line length in cuda/compiler.py
gmarkall Feb 11, 2022
17f9585
Merge remote-tracking branch 'numba/main' into cuda-dispatcher-base-2…
gmarkall Feb 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CUDA Dispatcher: use default finalizer
- For device functions, this works exactly like on the CPU target
  because device functions are CompileResult objects that are inserted
  into the target context (and therefore need removing by the
  finalizer).
- For kernels, we give them a dummy entry point because they were never
  inserted and don't need removing (similar to with object mode
  functions).
  • Loading branch information
gmarkall committed Feb 4, 2022
commit 5d6384c58e531509fca7a190fc17357397ec2558
15 changes: 8 additions & 7 deletions numba/cuda/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def __init__(self, py_func, argtypes, link=None, debug=False,
# target with slight modifications.
self.objectmode = False

# The finalizer constructed by _DispatcherBase._make_finalizer also
# expects overloads to be a CompileResult. It uses the entry_point to
# remove a CompileResult from a target context. However, since we never
# insert kernels into a target context (there is no need because they
# cannot be called by other functions, only through the dispatcher) it
# suffices to pretend we have an entry point of None.
self.entry_point = None

self.py_func = py_func
self.argtypes = argtypes
self.debug = debug
Expand Down Expand Up @@ -485,13 +493,6 @@ def __init__(self, py_func, targetoptions, pipeline_class=CUDACompiler):
# argument types
self.specializations = {}

def _make_finalizer(self):
# Dummy finalizer whilst _DispatcherBase assumes the existence of a
# finalizer
def finalizer():
pass
return finalizer

@property
def _numba_type_(self):
return cuda_types.CUDADispatcher(self)
Expand Down