opencl: fix couple crashes#12795
Conversation
* fix kernel launches failed on devices which do not support non-uniform work-groups. When non-uniform work-groups are not supported, set `local_work_size` to NULL (= let driver choose the work-group sizes). This patch does not cover everything - just the cases tested by test-backend-ops. * fix sub-buffer creation failed due to `cl_buffer_region::origin` not being aligned to `CL_DEVICE_MEM_BASE_ADDR_ALIGN`.
90c9d04 to
15bbce9
Compare
|
Gentle ping, @max-krasnyansky, @lhez. Is this PR good for landing? |
|
Thank you @linehill for the PR. I totally missed this. @max-krasnyansky seems out of office this week, so I think we will need to wait until he comes back. Regarding the non-uniform workgroup size, what device did you use to observe the crash? Would like to try reproducing the crash.
|
The crash was encountered on Intel iGPU through PoCL's Level0 backend. PoCL-Level0 doesn't (yet) support non-uniform workgroup sizes so
I missed this one - it should be fixed now. |
|
@max-krasnyansky ping - I think this PR should be good to merge. |
|
Sorry for the delay. Approving & merging now. |
* opencl: fix couple crashes * fix kernel launches failed on devices which do not support non-uniform work-groups. When non-uniform work-groups are not supported, set `local_work_size` to NULL (= let driver choose the work-group sizes). This patch does not cover everything - just the cases tested by test-backend-ops. * fix sub-buffer creation failed due to `cl_buffer_region::origin` not being aligned to `CL_DEVICE_MEM_BASE_ADDR_ALIGN`. * OpenCL: query non-uniform WG sizes only on OpenCL 3.0+
* opencl: fix couple crashes * fix kernel launches failed on devices which do not support non-uniform work-groups. When non-uniform work-groups are not supported, set `local_work_size` to NULL (= let driver choose the work-group sizes). This patch does not cover everything - just the cases tested by test-backend-ops. * fix sub-buffer creation failed due to `cl_buffer_region::origin` not being aligned to `CL_DEVICE_MEM_BASE_ADDR_ALIGN`. * OpenCL: query non-uniform WG sizes only on OpenCL 3.0+
fix kernel launches failed on devices which do not support non-uniform work-groups. When non-uniform work-groups are not supported, set
local_work_sizeto NULL (= let driver choose the work-group sizes). This patch does not cover everything - just the cases tested by test-backend-ops.fix sub-buffer creation failed due to
cl_buffer_region::originnot being aligned toCL_DEVICE_MEM_BASE_ADDR_ALIGN.