<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 3/18/2024 9:52 AM,
<a class="moz-txt-link-abbreviated" href="mailto:janga.rahul.kumar@intel.com">janga.rahul.kumar@intel.com</a> wrote:<br>
</div>
<blockquote type="cite" cite="mid:20240318085227.2624098-1-janga.rahul.kumar@intel.com">
<pre class="moz-quote-pre" wrap="">From: Janga Rahul Kumar <a class="moz-txt-link-rfc2396E" href="mailto:janga.rahul.kumar@intel.com"><janga.rahul.kumar@intel.com></a>
Global workgroup size is calculated based on local X/Y/Z maximum
and thread group id X dimension.
Cc: Nirmoy Das <a class="moz-txt-link-rfc2396E" href="mailto:nirmoy.das@intel.com"><nirmoy.das@intel.com></a>
Signed-off-by: Janga Rahul Kumar <a class="moz-txt-link-rfc2396E" href="mailto:janga.rahul.kumar@intel.com"><janga.rahul.kumar@intel.com></a></pre>
</blockquote>
Reviewed-by: <span style="white-space: pre-wrap"> Nirmoy Das <a class="moz-txt-link-rfc2396E" href="mailto:nirmoy.das@intel.com"><nirmoy.das@intel.com></a></span>
<blockquote type="cite" cite="mid:20240318085227.2624098-1-janga.rahul.kumar@intel.com">
<pre class="moz-quote-pre" wrap="">
---
lib/intel_compute.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/intel_compute.c b/lib/intel_compute.c
index 9d3b97efe..72025a481 100644
--- a/lib/intel_compute.c
+++ b/lib/intel_compute.c
@@ -1243,15 +1243,19 @@ static void xe2lpg_compute_exec_compute(uint32_t *addr_bo_buffer_batch,
addr_bo_buffer_batch[b++] = offset_indirect_data_start;
addr_bo_buffer_batch[b++] = 0xbe040000;
addr_bo_buffer_batch[b++] = 0xffffffff;
- addr_bo_buffer_batch[b++] = 0x000003ff;
+ addr_bo_buffer_batch[b++] = 0x000003ff; // Local X/Y/Z Dimension
if (threadgroup_preemption)
- addr_bo_buffer_batch[b++] = 0x00200000; // Global workgroup size
+ /*
+ * Create multiple threadgroups using higher gloabl workgroup size
+ * Global Workgroup size = Local X * Thread Group X + Local Y * Thread Group Y + Local Z * Thread Group Z
+ */
+ addr_bo_buffer_batch[b++] = 0x00200000; // Thread Group ID X Dimension
else
addr_bo_buffer_batch[b++] = 0x00000002;
- addr_bo_buffer_batch[b++] = 0x00000001;
- addr_bo_buffer_batch[b++] = 0x00000001;
+ addr_bo_buffer_batch[b++] = 0x00000001; // Thread Group ID Y Dimension
+ addr_bo_buffer_batch[b++] = 0x00000001; // Thread Group ID Z Dimension
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
</pre>
</blockquote>
</body>
</html>