Skip to content

Commit

Permalink
add small k size branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyu-intel committed Dec 8, 2023
1 parent 5ae9224 commit 5f0e6aa
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ class SchedulerKBlock : public Scheduler2D {
int BlkNum = utils::updiv(mSize[2], mKBlock);
int KSplitSize = utils::padto(utils::updiv(mSize[2], KSplitStage), mStep[2]);
mBlock[1] = NRef < mThdSize[1] ? NRef : mThdSize[1];
if (KSplitSize >= mKBlock) {
if (KSplitStage * mStep[2] >= mSize[2]) {
mBlock[2] = mSize[2];
} else if (KSplitSize >= mKBlock) {
mBlock[2] = mKBlock;
} else {
int scale = utils::downdiv(KSplitStage, BlkNum);
Expand All @@ -403,7 +405,7 @@ class SchedulerKBlock : public Scheduler2D {
}
}
mBlock[2] = utils::downdiv(mKBlock, scale);
mBlock[2] =utils::padto_le(mBlock[2],mStep[2]);
mBlock[2] = utils::padto_le(mBlock[2], mStep[2]);
}
size_t size_remain = mL2Size - mBlock[1] * mBlock[2] * mEleSize[1];
// MBlock*KBlock*ASize+MBlock*NBlock*CSize*2<=size_remain
Expand Down

0 comments on commit 5f0e6aa

Please sign in to comment.