[Beignet] [PATCH] Return error code when work group error instead of exit when clEnqueueNDRange.
Yang Rong
rong.r.yang at intel.com
Thu Oct 16 01:00:33 PDT 2014
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
src/cl_command_queue_gen7.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/cl_command_queue_gen7.c b/src/cl_command_queue_gen7.c
index b020540..c11e25d 100644
--- a/src/cl_command_queue_gen7.c
+++ b/src/cl_command_queue_gen7.c
@@ -317,7 +317,10 @@ cl_command_queue_ND_range_gen7(cl_command_queue queue,
kernel.use_slm = interp_kernel_use_slm(ker->opaque);
/* Compute the number of HW threads we need */
- TRY (cl_kernel_work_group_sz, ker, local_wk_sz, 3, &local_sz);
+ if(UNLIKELY(err = cl_kernel_work_group_sz(ker, local_wk_sz, 3, &local_sz) != CL_SUCCESS)) {
+ fprintf(stderr, "Beignet: Work group size exceed Kerne's work group size.\n");
+ return err;
+ }
kernel.thread_n = thread_n = (local_sz + simd_sz - 1) / simd_sz;
kernel.curbe_sz = cst_sz;
--
1.8.3.2
More information about the Beignet
mailing list