Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/loch/_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define CONSTANT __constant
#define LOCAL __local
#define GET_GLOBAL_ID(dim) get_global_id(dim)
#define BLOCK_ID_Y get_group_id(1) // OpenCL: work-group ID in dimension 1
#define BLOCK_ID_Y get_global_id(1) // OpenCL: y block size is 1, and the runtime picks the work-group shape
// Map CUDA-style function names to OpenCL names
#define sqrtf sqrt
#define powf pow
Expand Down
6 changes: 5 additions & 1 deletion src/loch/_platforms/_opencl.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ def wrapper(*args, **kwargs):
grid = kwargs.get("grid", (1, 1, 1))

global_size = tuple(b * g for b, g in zip(block, grid))
local_size = block

# OpenCL caps the work-group size per device (e.g. 256 on AMD),
# below common CUDA block sizes. The kernels use no local memory
# or barriers, so let the runtime pick the partitioning.
local_size = None

processed_args = []
for arg in args:
Expand Down