Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16605 Discussions

"Invalid global offset" error

Altera_Forum
Honored Contributor II
1,879 Views

Hi,  

 

Is at actually possible to use offsets when enqueuing a kernel with Altera? I'm currently getting a "Invalid Global Offset" error when I try and specify an offset.  

 

eg  

size_t global_wi [2] = {100, 100}; 

size_t local_wi [2] = {100, 100}; 

size_t global_offset [2] = {1, 1}; 

err = clEnqueueNDRangeKernel(queue, kernel, 2, global_offset, global_wi, local_wi, 0, NULL, NULL); 

 

With global_offset replaced with NULL, everything works correctly.  

 

Many thanks
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
638 Views

This is the first time I have heard of someone using that feature but according to the 1.0 spec it doesn't look like this is possible: http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clenqueuendrangekernel.html 

 

"Must currently be a NULL value. In a future revision of OpenCL, global_work_offset can be used to specify an array of work_dim unsigned values that describe the offset used to calculate the global ID of a work-item instead of having the global IDs always start at offset (0, 0,... 0)."
0 Kudos
Altera_Forum
Honored Contributor II
638 Views

Thanks for the response. I'd been working from OpenCL v1.1, apologies. I'll switch back to v1.0.

0 Kudos
Altera_Forum
Honored Contributor II
638 Views

Over time the supported spec version will increase. The offset you are attempting to pass in probably can become just another kernel argument that you need to add to the global ID within your kernel.

0 Kudos
Reply