Skip to content

Commit 57e47ea

Browse files
committed
Add new mUseBlockSparseAttention; parameter to KernelParams
1 parent acd3d5f commit 57e47ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/flashinfer/trtllm/fmha/kernelParams.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ struct KernelParams {
152152
int32_t mStartTokenIdxSfO;
153153
// The sum of sequence lengths for Q and K/V.
154154
int32_t mSumOfSeqLensQ, mSumOfSeqLensKv;
155+
// The flag to use block sparse attention.
156+
bool mUseBlockSparseAttention;
155157

156158
// Create the TMA shape/stride for Q.
157159
template <class FmhaOptions>
@@ -699,6 +701,8 @@ struct KernelParams {
699701
params.mStartTokenIdxSfO = options.mSfStartTokenIdx;
700702
params.mScaleSfKv = options.mScaleSfKv;
701703
params.ptrSoftmaxStats = options.softmaxStatsPtr;
704+
// TODO: Integrate trtllm block-sparse attention kernels when needed.
705+
params.mUseBlockSparseAttention = false;
702706
return params;
703707
}
704708
};

0 commit comments

Comments
 (0)