Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xe: sdpa: Fix KQ gemm alignment for the K tensor #2283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/gpu/intel/ocl/micro_sdpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ status_t micro_sdpa_t::pd_t::init_microkernels(impl::engine_t *engine) {

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