Boost logo

Boost Users :

From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2022-05-12 11:16:11


Hi everyone,

perhaps someone can answer a question about Boost.Compute. I have recently
switched to it from using native OpenCL.
Most of the things work fine except for one quirk:

OpenCL allows for auto-determining the work group size when using
enqueue_kernel(). As the correct work group size is still a mystery to me
after using OpenCl for almost a year now I normally left this parameter to
0 to let OpenCL figure it out.

With Boost.Compute and the equivalent function enqueue_nd_range_kernel()
this doesn't seem to be possible. I have to use a parameter like

boost::compute::extents<2>{ 8, 2 }

as local_work_size. Leaving it 0 or using extents<2>{ 0, 0 } doesn't do the
trick and I'm getting "Invalid work group size". This forces me to guess
values until one works, which is extremely error prone and breaks all the
time with images of different resolutions.
Does anyone know how I can use OpenCL's auto-work-group-size feature in
Boost.Compute?

Cheers,
Stephan



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net