Skip to content
Snippets Groups Projects
Commit 4a5c868a authored by Stefan van der Walt's avatar Stefan van der Walt
Browse files

In arrays, check platform maximum work group size.

parent a64cb98d
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,9 @@ import pyopencl as cl ...@@ -37,8 +37,9 @@ import pyopencl as cl
def splay(ctx, n): def splay(ctx, n):
min_work_items = 32 max_work_items = max(dev.max_work_group_size for dev in ctx.devices)
max_work_items = 128 max_work_items = min(128, max_work_items)
min_work_items = min(32, max_work_items)
max_groups = max( max_groups = max(
4 * dev.max_compute_units * 8 4 * dev.max_compute_units * 8
# 4 to overfill the device # 4 to overfill the device
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment