Skip to content

Commit 35faa75

Browse files
author
Diptorup Deb
committed
Fix OpenCL GPU kernel execution.
1 parent 7a5a317 commit 35faa75

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

numba_dpex/core/datamodel/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def __init__(self, dmm, fe_type):
4848
"data",
4949
types.CPointer(fe_type.dtype, addrspace=fe_type.addrspace),
5050
),
51-
("sycl_queue", types.voidptr),
51+
(
52+
"sycl_queue",
53+
types.CPointer(types.void, addrspace=fe_type.addrspace),
54+
),
5255
("shape", types.UniTuple(types.intp, ndim)),
5356
("strides", types.UniTuple(types.intp, ndim)),
5457
]

numba_dpex/core/utils/kernel_launcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ def build_array_arg(
217217
arg_num=arg_num,
218218
)
219219
arg_num += 1
220-
# Argument sycl_queue
221-
self._build_array_attr_arg(
222-
array_val=array_val,
223-
array_attr_pos=array_data_model.get_field_position("sycl_queue"),
224-
array_attr_ty=array_data_model.get_member_fe_type("sycl_queue"),
220+
# Argument sycl_queue: as the queue pointer is not to be used in a
221+
# kernel we always pass in a nullptr
222+
self.build_arg(
223+
val=nullptr,
224+
ty=types.int64,
225225
arg_list=arg_list,
226226
args_ty_list=args_ty_list,
227227
arg_num=arg_num,

0 commit comments

Comments
 (0)