Skip to content

Commit e0c2bcd

Browse files
DianaChenigcbot
authored andcommitted
vISA LocalScheduler: add 6-instructions-latency to WAR dependency to a send (2nd try)
Add WAR_SEND_LATENCY=12 for instructions having WAR to sends to hide the latency in between. A send does not read its srcs quickly. The send message sits in MAO until it grants the use of the SF. Is until that moment where it starts reading its source. Moreover, if the message is long (messages can red in average 6 registers), freeing the $x.src dependency can take several cycles. If there are several EUs competing for the use of the MAO, this time can elongate further.
1 parent f247f07 commit e0c2bcd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

visa/LocalScheduler/LatencyTable.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ namespace vISA
2626
IVB_PIPELINE_LENGTH = 14,
2727
EDGE_LATENCY_MATH = 22,
2828
EDGE_LATENCY_MATH_TYPE2 = 30,
29-
EDGE_LATENCY_SEND_WAR = 36
29+
EDGE_LATENCY_SEND_WAR = 36,
30+
WAR_SEND_LATENCY = 12 // Latency between an inst and previous send which the inst has WAR dependency to the send
3031
};
3132

3233
//

visa/LocalScheduler/LocalScheduler_G4IR.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,6 +2922,13 @@ uint32_t DDD::getEdgeLatency_old(Node *node, DepType depT)
29222922
break;
29232923

29242924
case WAR:
2925+
if (inst->isSend() && getBuilder()->hasSWSB()) {
2926+
// enable only for platforms having swsb to avoid unexpected
2927+
// failures found on pre-XE platforms
2928+
latency = WAR_SEND_LATENCY;
2929+
break;
2930+
}
2931+
// fall through
29252932
case WAR_MEMORY:
29262933
case WAW:
29272934
case WAW_MEMORY: //?? WAW have the same cycle as RAW?

0 commit comments

Comments
 (0)