Skip to content

Commit

Permalink
[IGC vISA] Fix the issue that mul QDD is not supported
Browse files Browse the repository at this point in the history
Fix the issue that mul QDD is not supported on PVCXT
  • Loading branch information
fangliu2020 authored and igcbot committed Aug 29, 2023
1 parent 70a1401 commit bef6955
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions visa/HWCaps.inc
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ bool noFP64() const {
return getPlatform() == GENX_ICLLP || isXeLP() || getPlatform() == Xe_DG2;
}

bool hasQDDMul() const {
return getPlatform() == GENX_BDW || getPlatform() == GENX_SKL ||
getPlatform() == GENX_BXT || getPlatform() == GENX_CNL ||
getPlatform() == Xe_XeHPSDV || getPlatform() == Xe_PVC;
}

bool no64bitRegioning() const {
return getPlatform() == GENX_CHV || getPlatform() == GENX_BXT ||
getPlatform() == GENX_ICLLP || isXeLP() || getPlatform() == Xe_DG2 ||
Expand Down
4 changes: 2 additions & 2 deletions visa/HWConformity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,7 @@ bool HWConformity::fixMULInst(INST_LIST_ITER &i, G4_BB *bb) {
}

bool doNativeMul = false;
if (!builder.no64bitRegioning()) {
if (builder.hasQDDMul()) {
// platform natively supports DW-DW multiply, no need to generate
// mul/mach/mov sequence
doNativeMul = true;
Expand Down Expand Up @@ -2673,7 +2673,7 @@ void HWConformity::fixMULHInst(INST_LIST_ITER &i, G4_BB *bb) {
}

bool useMulQDD = false;
if (execSize <= builder.getNativeExecSize() && !builder.no64bitRegioning() &&
if (execSize <= builder.getNativeExecSize() && builder.hasQDDMul() &&
builder.supportFloatOr64bRegioning()) {
useMulQDD = true;
if (!IS_DTYPE(src0->getType()) || !IS_DTYPE(src1->getType())) {
Expand Down

0 comments on commit bef6955

Please sign in to comment.