Skip to content

Commit

Permalink
[Autobackout][FuncReg]Revert of change: c9a7831
Browse files Browse the repository at this point in the history
 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
  • Loading branch information
bcheng0127 authored and igcbot committed Jul 30, 2023
1 parent 4c38018 commit 11d1e56
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 19 additions & 0 deletions visa/BinaryEncodingIGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,25 @@ void BinaryEncodingIGA::SetSWSB(G4_INST *inst, SWSB &sw) {
sw.sbid = token;
}

// Workaround: adjust send's swsb to align with HW behavior. Only adjust
// when solely token or distance is used on the instruction.
// - send has only SBID.src/dst --> SBID.set
// - send has only distance --> $0 and distance
// This workaround can be removed once vISA doesn't produce such SWSB.
// Currently this could happen only on EOT send.
if (inst->isSend() && !sw.hasBothDistAndToken() &&
!sw.verify(IGAKernel->getModel().getSWSBEncodeMode(),
SWSB::InstType::SEND)) {
sw.tokenType = SWSB::TokenType::SET;
if (sw.hasDist()) {
// if the distance type cannot be combined with SBID.set, force
// to ALL pipe
if (sw.distType != SWSB::DistType::REG_DIST_ALL &&
sw.distType != SWSB::DistType::REG_DIST_FLOAT &&
sw.distType != SWSB::DistType::REG_DIST_INT)
sw.distType = SWSB::DistType::REG_DIST_ALL;
}
}
return;
}

Expand Down
3 changes: 1 addition & 2 deletions visa/LocalScheduler/SWSB_G4IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2904,8 +2904,7 @@ void SWSB::tokenAllocation() {
printf("\n=======nodeID: %d, startID: %d, endID: %d\n", node->getNodeID(),
node->getLiveStartID(), node->getLiveEndID());
#endif

if (!fg.builder->hasFourALUPipes() && inst->isEOT()) {
if (inst->isEOT()) {
continue;
}

Expand Down

0 comments on commit 11d1e56

Please sign in to comment.