Skip to content

Commit b2aefc8

Browse files
bcheng0127igcbot
authored andcommitted
disable 4 GRFs acc sub
acc sub don't support 4 GRFs size operand
1 parent e6c6c6d commit b2aefc8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

visa/G4_IR.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7079,6 +7079,19 @@ bool G4_INST::isSupportedAccDstType() const {
70797079
// -- contiguous regions
70807080
// -- simd8 for D/UD, simd8/16 for F, simd16 for HF/W, other types not allowed
70817081
bool G4_INST::canDstBeAcc() const {
7082+
7083+
auto cross2GRFDst = [this](G4_DstRegRegion *dst) {
7084+
if (dst->isNullReg() || dst->isIndirect()) { //No acc
7085+
return true;
7086+
}
7087+
if (dst->getSubRegOff() * dst->getTypeSize() + dst->getLinearizedEnd() -
7088+
dst->getLinearizedStart() + 1 >
7089+
(getBuilder().numEltPerGRF<Type_UB>() * 2u)) {
7090+
return true;
7091+
}
7092+
return false;
7093+
};
7094+
70827095
if (isSend() || isDpas()) {
70837096
return false;
70847097
}
@@ -7103,6 +7116,10 @@ bool G4_INST::canDstBeAcc() const {
71037116
return false;
71047117
}
71057118

7119+
if (cross2GRFDst(dst)) {
7120+
return false;
7121+
}
7122+
71067123
// src0 may not have indirect regioning
71077124
if (!builder.accDstforIndirectSrc() && getSrc(0) &&
71087125
getSrc(0)->isSrcRegRegion()) {

0 commit comments

Comments
 (0)