Skip to content

Commit ebbe1ab

Browse files
committed
xe: sdpa: Fix KQ gemm alignment for the K tensor
1 parent 6fec1cd commit ebbe1ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gpu/intel/ocl/micro_sdpa.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ status_t micro_sdpa_t::pd_t::init_microkernels(impl::engine_t *engine) {
264264

265265
problem_kq.B.layout = MatrixLayout::Pr;
266266
problem_kq.C.layout = MatrixLayout::T;
267-
problem_kq.A.setAlignment(alignmentForLD(d->head_size() * problem.Ta));
267+
const memory_desc_wrapper key_mdw(key_md());
268+
auto ldk = gemm_desc_t::get_ld(*key_md()) * key_mdw.data_type_size();
269+
problem_kq.A.setAlignment(alignmentForLD(ldk));
268270
problem_kq.B.setAlignment(64); // Q is packed in VNNI format in SLM
269271
problem_kq.B.crosspack = 2;
270272
problem_kq.B.tileR = into<uint16_t>(d_max());

0 commit comments

Comments
 (0)