File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
include/flashinfer/attention Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1558,7 +1558,7 @@ __launch_bounds__(num_warps_x* num_warps_z* warp_size) void BatchPrefillWithRagg
1558
1558
// normalize d
1559
1559
normalize_d<num_frags_x, num_frags_y>(o_frag, m, d);
1560
1560
1561
- const uint32_t num_kv_chunks = ceil_div (kv_len, kv_chunk_size);
1561
+ const uint32_t num_kv_chunks = ceil_div (max ( kv_len, 1 ) , kv_chunk_size);
1562
1562
1563
1563
// write back
1564
1564
write_o_reg_gmem<num_warps_x, num_warps_z, num_frags_x, num_frags_y>(
@@ -1872,7 +1872,7 @@ __launch_bounds__(num_warps_x* num_warps_z* warp_size) void BatchPrefillWithPage
1872
1872
// normalize d
1873
1873
normalize_d<num_frags_x, num_frags_y>(o_frag, m, d);
1874
1874
1875
- const uint32_t num_kv_chunks = ceil_div (kv_len, kv_chunk_size);
1875
+ const uint32_t num_kv_chunks = ceil_div (max ( kv_len, 1 ) , kv_chunk_size);
1876
1876
1877
1877
// write_back
1878
1878
write_o_reg_gmem<num_warps_x, num_warps_z, num_frags_x, num_frags_y>(
You can’t perform that action at this time.
0 commit comments