Skip to content

Commit

Permalink
xe: jit: gemm: check layouts are empty instead of registers
Browse files Browse the repository at this point in the history
  • Loading branch information
dyoussif committed Sep 17, 2024
1 parent 93a6001 commit ded1195
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gpu/intel/jit/gemm/generator/pieces/quantization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void BLASKernelGenerator<hw>::gemmRepack2DQuantizationData(Type Ts, Type Td, con
const GRFMultirange &src, const GRFMultirange &dst,
const GEMMProblem &problem, const GEMMStrategy &strategy, GEMMState &state)
{
if (dst.empty()) return;
if (layoutDst.empty()) return;

int ms, ns, md, nd;
getLayoutDims(layoutSrc, ms, ns);
Expand Down Expand Up @@ -435,10 +435,10 @@ void BLASKernelGenerator<hw>::gemmDequantizeAB(bool doA, Type Tsrc, Type Tdst,
auto &srRegs = doA ? state.Ar_scaleRegs : state.Br_scaleRegs;
bool lateScale = doA ? state.lateScale2DA : state.lateScale2DB;

auto &oLayout = orRegs.empty() ? oiLayout : orLayout;
auto &oRegs = orRegs.empty() ? oiRegs : orRegs;
auto &sLayout = srRegs.empty() ? siLayout : srLayout;
auto &sRegs = srRegs.empty() ? siRegs : srRegs;
auto &oLayout = orLayout.empty() ? oiLayout : orLayout;
auto &oRegs = orLayout.empty() ? oiRegs : orRegs;
auto &sLayout = srLayout.empty() ? siLayout : srLayout;
auto &sRegs = srLayout.empty() ? siRegs : srRegs;

bool xo2D = !oLayout.empty();
bool xs2D = !sLayout.empty() && !lateScale;
Expand Down

0 comments on commit ded1195

Please sign in to comment.