Skip to content

Commit c0a134f

Browse files
committed
add comments to if else
1 parent 7d3520c commit c0a134f

File tree

1 file changed

+2
-0
lines changed
  • libflashinfer/include/flashinfer/attention/generic

1 file changed

+2
-0
lines changed

libflashinfer/include/flashinfer/attention/generic/decode.cuh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,12 +686,14 @@ gpuError_t SingleDecodeWithKVCacheDispatched(Params params, typename Params::DTy
686686
FI_GPU_CALL(gpuFuncSetAttribute(kernel, gpuFuncAttributeMaxDynamicSharedMemorySize, smem_size));
687687

688688
if (seq_len <= 256 || tmp == nullptr) {
689+
// No need to use partition-kv kernel
689690
dim3 nblks = dim3(1, num_kv_heads);
690691
dim3 nthrs = dim3(bdx, bdy, bdz);
691692
params.kv_chunk_size = seq_len;
692693
void* args[] = {(void*)&params};
693694
FI_GPU_CALL(gpuLaunchKernel((void*)kernel, nblks, nthrs, args, smem_size, stream));
694695
} else {
696+
// Use partition-kv kernel with AMD-specific tuning
695697
int num_blocks_per_sm = 0;
696698
int num_sm = 0;
697699
int dev_id = 0;

0 commit comments

Comments
 (0)