Skip to content

Commit 5311efb

Browse files
weiyu-chensys_zuul
authored andcommitted
Fix send payload coalescing when a source is larger than two GRFs
Change-Id: I0e2b44b7aac585f6f25f5100f03a2c86a9e74d53
1 parent 159fe42 commit 5311efb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

visa/TranslationInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10515,17 +10515,18 @@ G4_SrcRegRegion *IR_Builder::coalescePayload(
1051510515
unsigned MAX_SIMD = 32;
1051610516
for (unsigned i = 0; i < totalElemsToCopy/MAX_SIMD; i++) {
1051710517
// full registers to copy
10518+
auto rowOffset = i * ((MAX_SIMD * typeSize) / getGRFSize());
1051810519
unsigned int instOpt =
1051910520
Get_Gen4_Emask(vISA_EMASK_M1_NM, MAX_SIMD);
1052010521
G4_DstRegRegion *dstRegion =
1052110522
createDst(
1052210523
payloadDeclUD->getRegVar(),
10523-
row, offset/typeSize,
10524+
row + rowOffset, offset/typeSize,
1052410525
1, type);
1052510526
G4_SrcRegRegion *srcRegion =
1052610527
createSrcRegRegion(
1052710528
Mod_src_undef, Direct,
10528-
srcDcl->getRegVar(), 0, 0,
10529+
srcDcl->getRegVar(), rowOffset, 0,
1052910530
rd110,
1053010531
type);
1053110532
createMov(MAX_SIMD,

0 commit comments

Comments
 (0)