Skip to content

Commit 48c114b

Browse files
committed
xe3: jit: gemm: workaround for HW DPAS read suppression bug
1 parent 3b6665b commit 48c114b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/gpu/intel/gemm/jit/generator/pieces/gemm_setup.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,17 @@ bool Generator<hw>::gemmAccumulateCSetup(GEMMProblem &problem, GEMMStrategy &str
21282128
releaseLDMultiples(state.ldcMultiples[q], state);
21292129
releaseIndexVec(state);
21302130

2131+
// Workaround for Xe3 HW bug: dpas with uninitialized src1/src2 can cause
2132+
// data corruption in other threads.
2133+
if (hw == HW::Xe3 && strategy.systolic) {
2134+
if (state.A_layout.hasFlags() && state.Ar_regs.empty())
2135+
for (auto &A_regs: state.A_regs)
2136+
zeroMatrix(A_regs, strategy);
2137+
if (state.B_layout.hasFlags() && state.Br_regs.empty())
2138+
for (auto &B_regs: state.B_regs)
2139+
zeroMatrix(B_regs, strategy);
2140+
}
2141+
21312142
// Release 64-bit emulation registers as they aren't needed in the inner loop.
21322143
// Could also move r0 to acc here.
21332144
if (state.emulate.temp[0].isValid()) {

0 commit comments

Comments
 (0)