Skip to content

Commit

Permalink
OpenCL config: clamp micro naps, don't reset it
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Jan 15, 2025
1 parent ec1cbad commit 2a0a9b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common/opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ gboolean dt_opencl_read_device_config(const int devid)
// do some safety housekeeping
cl->dev[devid].avoid_atomics &= 1;
cl->dev[devid].pinned_memory &= (DT_OPENCL_PINNING_ON | DT_OPENCL_PINNING_DISABLED);
if((cl->dev[devid].micro_nap < 0) || (cl->dev[devid].micro_nap > 1000000))
cl->dev[devid].micro_nap = 250;
cl->dev[devid].micro_nap = CLAMP(cl->dev[devid].micro_nap, 250, 1000000);
if((cl->dev[devid].clroundup_wd < 2) || (cl->dev[devid].clroundup_wd > 512))
cl->dev[devid].clroundup_wd = 16;
if((cl->dev[devid].clroundup_ht < 2) || (cl->dev[devid].clroundup_ht > 512))
Expand Down

0 comments on commit 2a0a9b9

Please sign in to comment.