Skip to content

Commit

Permalink
For send instruction if any dependence is set the token ID is required
Browse files Browse the repository at this point in the history
For send instruction if any dependence is set the token ID is required
  • Loading branch information
bcheng0127 authored and igcbot committed Jul 12, 2023
1 parent d0d920f commit c9a7831
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
19 changes: 0 additions & 19 deletions visa/BinaryEncodingIGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,25 +975,6 @@ 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: 2 additions & 1 deletion visa/LocalScheduler/SWSB_G4IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,8 @@ void SWSB::tokenAllocation() {
printf("\n=======nodeID: %d, startID: %d, endID: %d\n", node->getNodeID(),
node->getLiveStartID(), node->getLiveEndID());
#endif
if (inst->isEOT()) {

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

Expand Down

0 comments on commit c9a7831

Please sign in to comment.