Early return if seqlen_k=0 on group mode (#1524)

[ROCm/composable_kernel commit: 770d2b7725]
This commit is contained in:
Po Yen Chen
2024-09-22 20:05:58 +08:00
committed by GitHub
parent e4f4e04add
commit 53b581e122
2 changed files with 3 additions and 3 deletions

View File

@@ -215,8 +215,8 @@ struct BlockFmhaPipelineQRKSVS
const auto num_total_loop = integer_divide_ceil(seqlen_k_end - seqlen_k_start, kN0);
// check early exit if masked and no work to do.
if constexpr(FmhaMask::IsMasking)
// check early exit if no work to do
if constexpr(FmhaMask::IsMasking || kPadSeqLenK)
{
if(num_total_loop <= 0)
{

View File

@@ -268,7 +268,7 @@ struct BlockFmhaPipelineQRKSVSAsync
const auto num_total_loop = integer_divide_ceil(seqlen_k_end - seqlen_k_start, kN0);
// check early exit
// check early exit if no work to do
if constexpr(FmhaMask::IsMasking || kPadSeqLenK)
{
if(num_total_loop <= 0)