Skip to content
Merged
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions kernel_tuner/backends/pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def ready_argument_list(self, arguments):
# pycuda does not support bool, convert to uint8 instead
elif isinstance(arg, np.bool_):
gpu_args.append(arg.astype(np.uint8))
# pycuda does not support 16-bit formats, view them as uint16
elif isinstance(arg, np.generic) and str(arg.dtype) in ("float16", "bfloat16"):
gpu_args.append(arg.view(np.uint16))
# if not an array, just pass argument along
else:
gpu_args.append(arg)
Expand Down