From df6763cd5fc57837e3c94eff325d3b7a217bdd48 Mon Sep 17 00:00:00 2001 From: Pete Chou Date: Tue, 17 Dec 2024 17:41:35 +0000 Subject: [PATCH] Let EOT send participate in swsb token assignment. using same sbid in send instructions might cause a potential stall. --- visa/BinaryEncodingIGA.cpp | 2 +- visa/LocalScheduler/SWSB_G4IR.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/visa/BinaryEncodingIGA.cpp b/visa/BinaryEncodingIGA.cpp index eb6d5eef1bdc..d97bc13bc6dc 100644 --- a/visa/BinaryEncodingIGA.cpp +++ b/visa/BinaryEncodingIGA.cpp @@ -995,7 +995,7 @@ void BinaryEncodingIGA::SetSWSB(G4_INST *inst, SWSB &sw) { // - 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() && + if (inst->isSend() && !sw.verify(getIGASWSBEncodeMode(), SWSB::InstType::SEND)) { sw.tokenType = SWSB::TokenType::SET; if (sw.hasDist()) { diff --git a/visa/LocalScheduler/SWSB_G4IR.cpp b/visa/LocalScheduler/SWSB_G4IR.cpp index e935dadf5353..50db4d8a7140 100644 --- a/visa/LocalScheduler/SWSB_G4IR.cpp +++ b/visa/LocalScheduler/SWSB_G4IR.cpp @@ -3033,7 +3033,7 @@ 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; }