Skip to content

Commit

Permalink
Add platform PVCXT for PVC WAR send WA
Browse files Browse the repository at this point in the history
PVCXT is B0+ of PVC
  • Loading branch information
bcheng0127 authored and igcbot committed Sep 4, 2024
1 parent e4cb7f5 commit 76cf269
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions visa/HWCaps.inc
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,11 @@ bool WARLocalization() const {
}

bool hasPVCSendWARWA() const {
return getPlatform() == Xe_PVC;
return getPlatform() == Xe_PVC || getPlatform() == Xe_PVCXT;
}

bool PVCSendWARWA() const {
if (getOption(vISA_PVCSendWARWA) && getPlatform() == Xe_PVC) {
if (getOption(vISA_PVCSendWARWA) && (getPlatform() == Xe_PVC || getPlatform() == Xe_PVCXT)) {
return true;
}
return false;
Expand Down
14 changes: 13 additions & 1 deletion visa/LocalScheduler/SWSB_G4IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4735,6 +4735,16 @@ void SWSB::insertPVCWA() {
std::vector<FIFOQueueType> LSCLastTwoGRFsOfToken(totalTokenNum);
std::vector<FIFOQueueType> nonLSClastTwoGRFsOfToken(totalTokenNum);

auto cleanLSCGRF = [&](unsigned short i) {
LSCLastTwoGRFsOfToken[i].first = LSCLastTwoGRFsOfToken[i].second =
INVALID_GRF;
};

auto cleanNonLSCGRF = [&](unsigned short i) {
nonLSClastTwoGRFsOfToken[i].first = nonLSClastTwoGRFsOfToken[i].second =
INVALID_GRF;
};

auto cleanGRF = [&](unsigned short i) {
LSCLastTwoGRFsOfToken[i].first = LSCLastTwoGRFsOfToken[i].second =
INVALID_GRF;
Expand Down Expand Up @@ -4820,9 +4830,11 @@ void SWSB::insertPVCWA() {
if (inst->getMsgDesc()->isLSC()) {
getLastTwoGRFsOfSend(LSCLastTwoGRFs, LSCLastTwoTokens, inst);
assignLSCGRF(token);
cleanNonLSCGRF(token);
} else {
getLastTwoGRFsOfSend(nonLSCLastTwoGRFs, nonLSCLastTwoTokens, inst);
assignNonLSCGRF(token);
cleanLSCGRF(token);
}
continue;
}
Expand Down Expand Up @@ -4909,7 +4921,7 @@ void SWSB::insertPVCWA() {
// Add WA for .src
if (insertDummyMovs(bb, inst_it, token, LSCLastTwoGRFsOfToken,
nonLSClastTwoGRFsOfToken)) {
cleanGRFs();
cleanGRF(token);
insertSyncInt1(bb, inst_it);
if (inst->opcode() == G4_sync_nop &&
inst->getDistanceTypeXe() ==
Expand Down

0 comments on commit 76cf269

Please sign in to comment.