[Beignet] [PATCH] Backend: Increase stack size for CHV device
Guo, Yejun
yejun.guo at intel.com
Fri Sep 9 07:07:05 UTC 2016
after sync with Xiuli, I'll merge it to another patch and send out later
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Xiuli Pan
Sent: Friday, September 09, 2016 1:38 PM
To: beignet at lists.freedesktop.org
Cc: Pan, Xiuli
Subject: [Beignet] [PATCH] Backend: Increase stack size for CHV device
From: Pan Xiuli <xiuli.pan at intel.com>
CHV device have two kinds of EU numbers, this will make stack pointer calculate wrong. Make it double for safe.
Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
src/cl_command_queue_gen7.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cl_command_queue_gen7.c b/src/cl_command_queue_gen7.c index 6a9cf1f..d1186c2 100644
--- a/src/cl_command_queue_gen7.c
+++ b/src/cl_command_queue_gen7.c
@@ -25,6 +25,7 @@
#include "cl_mem.h"
#include "cl_utils.h"
#include "cl_alloc.h"
+#include "cl_device_data.h"
#include <assert.h>
#include <stdio.h>
@@ -278,6 +279,9 @@ cl_bind_stack(cl_gpgpu gpgpu, cl_kernel ker)
*/
if(cl_driver_get_ver(ctx->drv) == 75)
stack_sz *= 4;
+ /* Because CHV has two kind of EU numbers, multiply stack size with 2
+ for safe. */
+ if(IS_CHERRYVIEW(device->device_id))
+ stack_sz *= 2;
cl_gpgpu_set_stack(gpgpu, offset, stack_sz, BTI_PRIVATE); }
--
2.7.4
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list