Skip to content

Commit da3d1a0

Browse files
author
Diptorup Deb
authored
Merge pull request #1291 from chudur-budur/fix/nuke-default-local-size
Remove DEFAULT_LOCAL_SIZE completely from the code
2 parents 6ec9c63 + 20e77b8 commit da3d1a0

File tree

4 files changed

+2
-30
lines changed

4 files changed

+2
-30
lines changed

docs/source/user_guide/kernel_programming/writing_kernels.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,6 @@ storing the result of vector summation:
3030
:name: ex_kernel_declaration_vector_sum
3131

3232

33-
.. Kernel Invocation
34-
.. ------------------
35-
36-
.. When a kernel is launched you must specify the *global size* and the *local size*,
37-
.. which determine the hierarchy of threads, that is the order in which kernels
38-
.. will be invoked.
39-
40-
.. The following syntax is used in ``numba-dpex`` for kernel invocation with
41-
.. specified global and local sizes:
42-
43-
.. ``kernel_function_name[global_size, local_size](kernel arguments)``
44-
45-
.. In the following example we invoke kernel ``kernel_vector_sum`` with global size
46-
.. specified via variable ``global_size``, and use ``numba_dpex.DEFAULT_LOCAL_SIZE``
47-
.. constant for setting local size to some default value:
48-
49-
.. .. code-block:: python
50-
51-
.. import numba_dpex as ndpx
52-
53-
.. global_size = 10
54-
.. kernel_vector_sum[global_size, ndpx.DEFAULT_LOCAL_SIZE](a, b, c)
55-
56-
.. .. note::
57-
.. Each kernel is compiled once, but it can be called multiple times with different global and local sizes settings.
58-
59-
6033
Kernel Invocation
6134
------------------
6235

docs/source/user_guide/programming_model.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Specifying the execution queue is done using Python context manager:
161161
with dpctl.device_context(q):
162162
# apply the kernel to elements of X, writing value into Y,
163163
# while executing using given queue
164-
numba_dpex_poly[X.size, numba_dpex.DEFAULT_LOCAL_SIZE](X, Y)
164+
numba_dpex_poly[numba_dpex.Range(X.size)](X, Y)
165165
166166
The argument to ``device_context`` can be a queue object, a device object for
167167
which a temporary queue will be created, or a filter selector string. Thus we

numba_dpex/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def parse_sem_version(version_string: str) -> Tuple[int, int, int]:
131131
sub_group_barrier,
132132
)
133133

134-
DEFAULT_LOCAL_SIZE = []
135134
load_dpctl_sycl_interface()
136135
del load_dpctl_sycl_interface
137136

numba_dpex/vectorizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def to_host(self, devary, queue):
194194
copy_to_numpy_from_usm_obj(devary_memview, hostary)
195195

196196
def launch(self, func, count, queue, args):
197-
func[count, dpex.DEFAULT_LOCAL_SIZE](*args)
197+
func[dpex.Range(count)](*args)
198198

199199
def device_array(self, shape, dtype, queue):
200200
size = np.prod(shape)

0 commit comments

Comments
 (0)