Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] avoid race in PA (#36573)

Michal Miotk0adebcf086fe
diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/paged_attention_opt.cl b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/paged_attention_opt.cl
index 889ee33ef11..b60a34f0c9a 100644
--- a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/paged_attention_opt.cl
+++ b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/paged_attention_opt.cl
@@ -201,7 +201,7 @@ KERNEL(pa_sdpa_opt)(
{
#if STORE_QUERY_TO_SLM
- for (uint i = sgid * SUBGROUP_SIZE; i < HEADS_PER_WI * K_HEAD_SIZE; i += SUBGROUP_SIZE) {
+ for (uint i = sgid * SUBGROUP_SIZE; i < HEADS_PER_WI * K_HEAD_SIZE; i += SUBGROUPS_PER_WG*SUBGROUP_SIZE) {
const uint query_idx_local = i % K_HEAD_SIZE + sglid;
const uint head_idx = i / K_HEAD_SIZE;