Skip to content

Commit 11d1e56

Browse files
bcheng0127igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: c9a7831
For send instruction if any dependence is set the token ID is required For send instruction if any dependence is set the token ID is required
1 parent 4c38018 commit 11d1e56

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

visa/BinaryEncodingIGA.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,25 @@ void BinaryEncodingIGA::SetSWSB(G4_INST *inst, SWSB &sw) {
975975
sw.sbid = token;
976976
}
977977

978+
// Workaround: adjust send's swsb to align with HW behavior. Only adjust
979+
// when solely token or distance is used on the instruction.
980+
// - send has only SBID.src/dst --> SBID.set
981+
// - send has only distance --> $0 and distance
982+
// This workaround can be removed once vISA doesn't produce such SWSB.
983+
// Currently this could happen only on EOT send.
984+
if (inst->isSend() && !sw.hasBothDistAndToken() &&
985+
!sw.verify(IGAKernel->getModel().getSWSBEncodeMode(),
986+
SWSB::InstType::SEND)) {
987+
sw.tokenType = SWSB::TokenType::SET;
988+
if (sw.hasDist()) {
989+
// if the distance type cannot be combined with SBID.set, force
990+
// to ALL pipe
991+
if (sw.distType != SWSB::DistType::REG_DIST_ALL &&
992+
sw.distType != SWSB::DistType::REG_DIST_FLOAT &&
993+
sw.distType != SWSB::DistType::REG_DIST_INT)
994+
sw.distType = SWSB::DistType::REG_DIST_ALL;
995+
}
996+
}
978997
return;
979998
}
980999

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2904,8 +2904,7 @@ void SWSB::tokenAllocation() {
29042904
printf("\n=======nodeID: %d, startID: %d, endID: %d\n", node->getNodeID(),
29052905
node->getLiveStartID(), node->getLiveEndID());
29062906
#endif
2907-
2908-
if (!fg.builder->hasFourALUPipes() && inst->isEOT()) {
2907+
if (inst->isEOT()) {
29092908
continue;
29102909
}
29112910

0 commit comments

Comments
 (0)