OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GPU] correct SDPA micro prefetch bounds (#36773)
Sungeun Kim1c26dc7b6473
diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_micro.cl b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_micro.clindex 5ae104d8718..3e7f65181c1 100644--- a/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_micro.cl+++ b/src/plugins/intel_gpu/src/graph/impls/ocl_v2/sdpa_micro.cl@@ -501,7 +501,7 @@ KERNEL(micro_sdpa)(OPTIONAL_SHAPE_INFO_ARG#endif#endif-#ifdef PREFETCH_K0+#if PREFETCH_K0/* Prefetch first K tile. */#if TRANSPOSE_Kconst uint stride_k0 = ldk;@@ -510,8 +510,8 @@ KERNEL(micro_sdpa)(OPTIONAL_SHAPE_INFO_ARG#endifcooperative_prefetch_2d_k(/* ptr */ K + window_k_begin * stride_k0,- /* r */ causal_k - window_k_begin,- /* c */ d,+ /* r */ d,+ /* c */ causal_k - window_k_begin,/* rmax */ ugemm_kq_wg_tile_m,/* cmax */ PREFETCH_D_MAX,/* ld */ ldk,@@ -851,7 +851,7 @@ KERNEL(micro_sdpa)(OPTIONAL_SHAPE_INFO_ARG}#endif-#ifdef PREFETCH_V+#if PREFETCH_V/* Prefetch V tile. */#if SLIDING_WINDOW_SIZE && !(IS_PAGED_ATTENTION && !IS_PREFILL)const int window_v_pf_begin = first ? (window_k_begin - k0) : 0;@@ -990,7 +990,7 @@ KERNEL(micro_sdpa)(OPTIONAL_SHAPE_INFO_ARGsg_i_kq);}-#ifdef PREFETCH_K+#if PREFETCH_K/* Prefetch next K tile. */if (!last) {#if TRANSPOSE_K