repo
stringclasses
3 values
commit
stringlengths
40
40
date
stringdate
2023-04-02 02:30:17-0500
2026-10-18 07:42:16-0500
pr_number
int64
20
61.9k
⌀
pr_url
stringlengths
44
53
⌀
title
stringlengths
8
263
message
stringlengths
8
8k
path
stringlengths
10
155
language
stringclasses
4 values
license
stringclasses
4 values
before_code
stringlengths
160
118k
after_code
stringlengths
340
120k
diff
stringlengths
149
51k
lines_added
int64
0
729
lines_removed
int64
0
488
files_in_commit
int64
1
10
models_mentioned
listlengths
0
4
hardware_mentioned
listlengths
0
16
speedup_claims
listlengths
0
10
prompt
stringlengths
569
119k
pr_body
stringlengths
0
24k
gains
stringlengths
2
197k
kernel_speedup
float64
0.78
150
⌀
e2e_speedup
float64
0.76
136
⌀
sglang
07f944631e747d7489fde1f11de93e503afa90ba
2025-03-12T00:10:02-07:00
4,104
https://github.com/sgl-project/sglang/pull/4104
Add awq dequantize kernel to sgl with 1x to 3x speedup (#4104)
Add awq dequantize kernel to sgl with 1x to 3x speedup (#4104)
sgl-kernel/csrc/torch_extension.cc
cpp
Apache-2.0
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
--- sgl-kernel/csrc/torch_extension.cc +++ sgl-kernel/csrc/torch_extension.cc @@ -75,6 +75,9 @@ /* * From csrc/gemm */ + m.def("awq_dequantize(Tensor qweight, Tensor scales, Tensor qzeros) -> Tensor"); + m.impl("awq_dequantize", torch::kCUDA, &awq_dequantize); + m.def( "int8_scaled_mm(Tensor mat_...
3
0
5
[]
[]
[ "1x", "3x" ]
Optimize this cpp kernel file from sglang (sgl-kernel/csrc/torch_extension.cc). Goal: Add awq dequantize kernel to sgl with 1x to 3x speedup Target hardware: unspecified Target models: unspecified Current file: ```cpp /* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 ...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation #2965 Adapted from [vllm awq_dequant](https://git...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "qweight_row=3584,qweight_col=448", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 80.863997, "optimized": 27.519999, "stated_speedup": null, "speedup": 2.9384}, {"scope": "kernel", "hardware": null, "model": n...
1.0684
null
sglang
07f944631e747d7489fde1f11de93e503afa90ba
2025-03-12T00:10:02-07:00
4,104
https://github.com/sgl-project/sglang/pull/4104
Add awq dequantize kernel to sgl with 1x to 3x speedup (#4104)
Add awq dequantize kernel to sgl with 1x to 3x speedup (#4104)
sgl-kernel/include/sgl_kernel_ops.h
cpp
Apache-2.0
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
--- sgl-kernel/include/sgl_kernel_ops.h +++ sgl-kernel/include/sgl_kernel_ops.h @@ -112,6 +112,7 @@ /* * From csrc/gemm */ +torch::Tensor awq_dequantize(torch::Tensor qweight, torch::Tensor scales, torch::Tensor qzeros); torch::Tensor int8_scaled_mm( const torch::Tensor& mat_a, const torch::Tensor& mat_...
1
0
5
[]
[]
[ "1x", "3x" ]
Optimize this cpp kernel file from sglang (sgl-kernel/include/sgl_kernel_ops.h). Goal: Add awq dequantize kernel to sgl with 1x to 3x speedup Target hardware: unspecified Target models: unspecified Current file: ```cpp /* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation #2965 Adapted from [vllm awq_dequant](https://git...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "qweight_row=3584,qweight_col=448", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 80.863997, "optimized": 27.519999, "stated_speedup": null, "speedup": 2.9384}, {"scope": "kernel", "hardware": null, "model": n...
1.0684
null
sglang
e0917e6bd0fbbbbc8ba3db48ae26f07366ab9a0c
2025-03-12T00:08:03-07:00
4,215
https://github.com/sgl-project/sglang/pull/4215
Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% (#4215)
Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% (#4215) Co-authored-by: Stefan He <bhe@linkedin.com>
python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py
triton
Apache-2.0
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
--- python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py +++ python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py @@ -11,7 +11,7 @@ import torch import triton import triton.language as tl -from vllm import _custom_ops as ops +from vllm import _custom_ops as vllm_ops from sglang.srt.layers.moe.topk imp...
14
6
3
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py). Goal: Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% Target hardware: unspecified Target models: unspecified Current file: ```python # Adapted from https://github.com/vllm-project/vllm...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Part of initiative: https://github.com/sgl-project/s...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "hidden_dim=4096", "batch_size": 16, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 26.272001, "optimized": 24.928, "stated_speedup": null, "speedup": 1.0539}, {"scope": "kernel", "hardware": null, "model": null, "shape": "hidden_...
1.3507
null
sglang
e0917e6bd0fbbbbc8ba3db48ae26f07366ab9a0c
2025-03-12T00:08:03-07:00
4,215
https://github.com/sgl-project/sglang/pull/4215
Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% (#4215)
Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% (#4215) Co-authored-by: Stefan He <bhe@linkedin.com>
sgl-kernel/csrc/gemm/per_token_quant_fp8.cu
cuda
Apache-2.0
#include <ATen/cuda/CUDAContext.h> #include <cmath> #include <cub/block/block_reduce.cuh> #include <flashinfer/vec_dtypes.cuh> #include "utils.h" template <typename T> __global__ void per_token_quant_fp8_kernel( const T* __restrict__ input, FP8_TYPE* __restrict__ output_q, float* __restrict__ output_s, ...
#include <ATen/cuda/CUDAContext.h> #include <cmath> #include <cub/block/block_reduce.cuh> #include <flashinfer/vec_dtypes.cuh> #include "utils.h" template <typename T> __global__ void per_token_quant_fp8_kernel( const T* __restrict__ input, FP8_TYPE* __restrict__ output_q, float* __restrict__ output_s, ...
--- sgl-kernel/csrc/gemm/per_token_quant_fp8.cu +++ sgl-kernel/csrc/gemm/per_token_quant_fp8.cu @@ -14,7 +14,6 @@ const int64_t hidden_dim, const int64_t num_tokens) { const int token_idx = blockIdx.x; - if (token_idx >= num_tokens) return; const int tid = threadIdx.x; @@ -25,9 +24,20 @@ float...
19
23
3
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/csrc/gemm/per_token_quant_fp8.cu). Goal: Remove vllm ops scaled fp8 quant and accelerate per token quant by 20-28% Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <ATen/cuda/CUDAContext.h> #include <cmath> #include <cub/blo...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Part of initiative: https://github.com/sgl-project/s...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "hidden_dim=4096", "batch_size": 16, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 26.272001, "optimized": 24.928, "stated_speedup": null, "speedup": 1.0539}, {"scope": "kernel", "hardware": null, "model": null, "shape": "hidden_...
1.3507
null
sglang
cf0ccd406e38a63bdb984578ba742ca3c8ab81b8
2025-03-10T10:07:45-07:00
4,267
https://github.com/sgl-project/sglang/pull/4267
Optimize rope in sgl kernel (#4267)
Optimize rope in sgl kernel (#4267)
sgl-kernel/csrc/elementwise/rope.cu
cuda
Apache-2.0
/* * Copyright (c) 2024 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2024 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- sgl-kernel/csrc/elementwise/rope.cu +++ sgl-kernel/csrc/elementwise/rope.cu @@ -65,7 +65,7 @@ static_cast<c_type*>(q_rope.data_ptr()), static_cast<c_type*>(k_rope.data_ptr()), static_cast<float*>(cos_sin_cache.data_ptr()), - static_cast<int32_t*>(pos_ids.data_ptr()), + stati...
1
1
2
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/csrc/elementwise/rope.cu). Goal: Optimize rope in sgl kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda /* * Copyright (c) 2024 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
`positions` is int64, so we should not cast it to int32. This removes an extra copy
[]
null
null
sglang
ddcf9fe3beacd8aed573c711942194dd02350da4
2025-02-21T00:54:41+08:00
3,731
https://github.com/sgl-project/sglang/pull/3731
Optimize triton attention custom mask (#3731)
Optimize triton attention custom mask (#3731)
python/sglang/srt/layers/attention/triton_ops/extend_attention.py
triton
Apache-2.0
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
--- python/sglang/srt/layers/attention/triton_ops/extend_attention.py +++ python/sglang/srt/layers/attention/triton_ops/extend_attention.py @@ -74,6 +74,7 @@ BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, USE_CUSTOM_MASK: tl.constexpr, + SKIP_PREFIX_CUSTOM_MASK: tl.constexpr, STORE_TRANSPOSE: tl.c...
6
1
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/extend_attention.py). Goal: Optimize triton attention custom mask Target hardware: unspecified Target models: unspecified Current file: ```python # Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Skip custom mask for prefix part of triton attentio...
[]
null
null
sglang
634a3561ac5b58d6ed1fe07c2665bf523d7825ac
2025-02-19T01:35:58+08:00
3,665
https://github.com/sgl-project/sglang/pull/3665
AMD Prefill optimize (#3665)
AMD Prefill optimize (#3665) Co-authored-by: AMD-dteng <dteng@amd.com> Co-authored-by: HAI <hixiao@gmail.com>
python/sglang/srt/layers/attention/triton_ops/extend_attention.py
triton
Apache-2.0
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
--- python/sglang/srt/layers/attention/triton_ops/extend_attention.py +++ python/sglang/srt/layers/attention/triton_ops/extend_attention.py @@ -74,6 +74,7 @@ BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, USE_CUSTOM_MASK: tl.constexpr, + STORE_TRANSPOSE: tl.constexpr, ): cur_seq = tl.program_id(0...
16
5
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/extend_attention.py). Goal: AMD Prefill optimize Target hardware: unspecified Target models: unspecified Current file: ```python # Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
bb418ced802c6dbb6b0ae0d65218327129148769
2025-02-11T22:19:05+08:00
3,490
https://github.com/sgl-project/sglang/pull/3490
optimize per token group quant fp8 (#3490)
optimize per token group quant fp8 (#3490)
sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h
cpp
Apache-2.0
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
--- sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h +++ sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h @@ -143,3 +143,7 @@ void build_tree_kernel(at::Tensor parent_list, at::Tensor selected_index, at::Tensor verified_seq_len, at::Tensor tree_mask, at::Tensor positions, at::Tensor retri...
4
0
5
[]
[]
[]
Optimize this cpp kernel file from sglang (sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h). Goal: optimize per token group quant fp8 Target hardware: unspecified Target models: unspecified Current file: ```cpp /* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (th...
From the nsys profiling of DeepSeek H200 R1, it can be observed that the Triton version of the _per_token_group_quant_fp8 kernel is a relatively time-consuming operation, accounting for 2.1%. Upon examining its number of blocks and threads, it is found that the number of blocks is large while the number of threads is s...
[]
null
null
sglang
bb418ced802c6dbb6b0ae0d65218327129148769
2025-02-11T22:19:05+08:00
3,490
https://github.com/sgl-project/sglang/pull/3490
optimize per token group quant fp8 (#3490)
optimize per token group quant fp8 (#3490)
sgl-kernel/src/sgl-kernel/torch_extension.cc
cpp
Apache-2.0
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
--- sgl-kernel/src/sgl-kernel/torch_extension.cc +++ sgl-kernel/src/sgl-kernel/torch_extension.cc @@ -153,6 +153,12 @@ "Tensor! tree_mask, Tensor! positions, Tensor! retrive_index, " "int topk, int depth, int draft_token_num) -> ()"); m.impl("build_tree_kernel", torch::kCUDA, &build_tree_kernel); + + ...
6
0
5
[]
[]
[]
Optimize this cpp kernel file from sglang (sgl-kernel/src/sgl-kernel/torch_extension.cc). Goal: optimize per token group quant fp8 Target hardware: unspecified Target models: unspecified Current file: ```cpp /* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "Lice...
From the nsys profiling of DeepSeek H200 R1, it can be observed that the Triton version of the _per_token_group_quant_fp8 kernel is a relatively time-consuming operation, accounting for 2.1%. Upon examining its number of blocks and threads, it is found that the number of blocks is large while the number of threads is s...
[]
null
null
sglang
cdae77b03dfc6fec3863630550b45bbfc789f957
2025-02-07T00:53:46+08:00
3,347
https://github.com/sgl-project/sglang/pull/3347
optimize moe_align_kernel cuda (#3347)
optimize moe_align_kernel cuda (#3347)
python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py
triton
Apache-2.0
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
--- python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py +++ python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py @@ -417,12 +417,12 @@ num_tokens_post_pad, ) else: - token_cnts_buffer = torch.empty( + token_cnts_buffer = torch.zeros( ...
2
2
2
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py). Goal: optimize moe_align_kernel cuda Target hardware: unspecified Target models: unspecified Current file: ```python # Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81...
Thanks to @tim-zou help in https://github.com/sgl-project/sglang/issues/3339. ## DeepSeek V3 end2end benchmark ```shell python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-V3 --tp 8 --trust-remote-code python3 benchmark/gsm8k/bench_sglang.py --num-questions 2000 --parallel 2000 --num-shots 8 ``` After start...
[]
null
null
sglang
cdae77b03dfc6fec3863630550b45bbfc789f957
2025-02-07T00:53:46+08:00
3,347
https://github.com/sgl-project/sglang/pull/3347
optimize moe_align_kernel cuda (#3347)
optimize moe_align_kernel cuda (#3347)
sgl-kernel/src/sgl-kernel/csrc/moe_align_kernel.cu
cuda
Apache-2.0
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
/* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
--- sgl-kernel/src/sgl-kernel/csrc/moe_align_kernel.cu +++ sgl-kernel/src/sgl-kernel/csrc/moe_align_kernel.cu @@ -25,11 +25,23 @@ #define WARP_SIZE 32 template <typename scalar_t> +__global__ void moe_token_sort_kernel(scalar_t* __restrict__ topk_ids, int32_t* sorted_token_ids, + ...
23
15
2
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/moe_align_kernel.cu). Goal: optimize moe_align_kernel cuda Target hardware: unspecified Target models: unspecified Current file: ```cuda /* Copyright 2025 SGLang Team. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "...
Thanks to @tim-zou help in https://github.com/sgl-project/sglang/issues/3339. ## DeepSeek V3 end2end benchmark ```shell python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-V3 --tp 8 --trust-remote-code python3 benchmark/gsm8k/bench_sglang.py --num-questions 2000 --parallel 2000 --num-shots 8 ``` After start...
[]
null
null
sglang
d9eb9358ccf8803253d2f5cf7feafef13b60b8c5
2025-02-01T19:29:45-06:00
3,255
https://github.com/sgl-project/sglang/pull/3255
Tune paged attention parameters for AMD GPU. (#3255)
Tune paged attention parameters for AMD GPU. (#3255)
python/sglang/srt/layers/attention/triton_ops/decode_attention.py
triton
Apache-2.0
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
--- python/sglang/srt/layers/attention/triton_ops/decode_attention.py +++ python/sglang/srt/layers/attention/triton_ops/decode_attention.py @@ -181,6 +181,9 @@ logit_cap, ): BLOCK = 64 + # [TODO] work around SGPR limit on MI3xx + if is_hip_: + BLOCK = 8 NUM_KV_SPLITS = num_kv_splits Lk...
9
2
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/decode_attention.py). Goal: Tune paged attention parameters for AMD GPU. Target hardware: unspecified Target models: unspecified Current file: ```python # Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Ve...
## Motivation Fine tune SGLang page attention kernel performance on AMD MI GPU for LLM. ## Modifications Changes: - num_kv_splits : 8 -> 16 - BLOCK : 64 -> 8 - num_warps : 2 -> 1 when kv_group_num is more than 1 - waves_per_cu : 4 -> 1 in grouped paged attention kernel These knobs have been tested with a couple of ...
[]
null
null
sglang
fb11a4398158ce1838813b729d4ca188865b69f1
2025-01-26T23:28:00-08:00
3,134
https://github.com/sgl-project/sglang/pull/3134
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
sgl-kernel/src/sgl-kernel/csrc/rotary_embedding.cu
cuda
Apache-2.0
// Reference: https://github.com/vllm-project/vllm/blob/main/csrc/pos_encoding_kernels.cu #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <torch/all.h> template <typename scalar_t, bool IS_NEOX> inline __device__ void apply_token_rotary_embedding(scalar_t* __restrict__ arr, const scalar_t*...
// Reference: https://github.com/vllm-project/vllm/blob/main/csrc/pos_encoding_kernels.cu #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <torch/all.h> template <typename scalar_t, bool IS_NEOX> inline __device__ void apply_token_rotary_embedding(scalar_t* __restrict__ arr, const scalar_t*...
--- sgl-kernel/src/sgl-kernel/csrc/rotary_embedding.cu +++ sgl-kernel/src/sgl-kernel/csrc/rotary_embedding.cu @@ -98,7 +98,7 @@ int64_t query_stride = query.stride(-2); int64_t key_stride = key.stride(-2); - dim3 grid(num_tokens); + dim3 grid(num_tokens); // each block is responsible for one token dim3 bl...
1
1
6
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/rotary_embedding.cu). Goal: [kernel] Integrate flashinfer's rope with higher precision and better perf Target hardware: unspecified Target models: unspecified Current file: ```cuda // Reference: https://github.com/vllm-project/vllm/blob/main/c...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
fb11a4398158ce1838813b729d4ca188865b69f1
2025-01-26T23:28:00-08:00
3,134
https://github.com/sgl-project/sglang/pull/3134
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h
cpp
Apache-2.0
#pragma once #include <Python.h> #include <torch/extension.h> #include <vector> #define _CONCAT(A, B) A##B #define CONCAT(A, B) _CONCAT(A, B) #define _STRINGIFY(A) #A #define STRINGIFY(A) _STRINGIFY(A) #define TORCH_LIBRARY_EXPAND(NAME, MODULE) TORCH_LIBRARY(NAME, MODULE) #define REGISTER_EXTENSION(NAME) ...
#pragma once #include <Python.h> #include <torch/extension.h> #include <vector> #define _CONCAT(A, B) A##B #define CONCAT(A, B) _CONCAT(A, B) #define _STRINGIFY(A) #A #define STRINGIFY(A) _STRINGIFY(A) #define TORCH_LIBRARY_EXPAND(NAME, MODULE) TORCH_LIBRARY(NAME, MODULE) #define REGISTER_EXTENSION(NAME) ...
--- sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h +++ sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h @@ -112,3 +112,7 @@ void top_p_sampling_from_probs(at::Tensor probs, at::Tensor uniform_samples, at::Tensor samples, at::Tensor success, std::optional<at::Tensor> maybe_top_p_...
4
0
6
[]
[]
[]
Optimize this cpp kernel file from sglang (sgl-kernel/src/sgl-kernel/include/sgl_kernels_ops.h). Goal: [kernel] Integrate flashinfer's rope with higher precision and better perf Target hardware: unspecified Target models: unspecified Current file: ```cpp #pragma once #include <Python.h> #include <torch/extension.h> ...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
fb11a4398158ce1838813b729d4ca188865b69f1
2025-01-26T23:28:00-08:00
3,134
https://github.com/sgl-project/sglang/pull/3134
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
[kernel] Integrate flashinfer's rope with higher precision and better perf (#3134)
sgl-kernel/src/sgl-kernel/torch_extension.cc
cpp
Apache-2.0
#include <ATen/core/dispatch/Dispatcher.h> #include <torch/library.h> #include "sgl_kernels_ops.h" TORCH_LIBRARY_EXPAND(sgl_kernels, m) { // trt_reduce m.def( "init_custom_ar(int rank_id, int world_size, Tensor rank_data, int[] buffers, int[] tmp_result_buffers, int[] " "barrier_in, int[] barrier_out...
#include <ATen/core/dispatch/Dispatcher.h> #include <torch/library.h> #include "sgl_kernels_ops.h" TORCH_LIBRARY_EXPAND(sgl_kernels, m) { // trt_reduce m.def( "init_custom_ar(int rank_id, int world_size, Tensor rank_data, int[] buffers, int[] tmp_result_buffers, int[] " "barrier_in, int[] barrier_out)...
--- sgl-kernel/src/sgl-kernel/torch_extension.cc +++ sgl-kernel/src/sgl-kernel/torch_extension.cc @@ -1,4 +1,3 @@ - #include <ATen/core/dispatch/Dispatcher.h> #include <torch/library.h> @@ -116,6 +115,12 @@ "top_p_sampling_from_probs(Tensor probs, Tensor uniform_samples, Tensor! samples, Tensor! success, Ten...
6
1
6
[]
[]
[]
Optimize this cpp kernel file from sglang (sgl-kernel/src/sgl-kernel/torch_extension.cc). Goal: [kernel] Integrate flashinfer's rope with higher precision and better perf Target hardware: unspecified Target models: unspecified Current file: ```cpp #include <ATen/core/dispatch/Dispatcher.h> #include <torch/library.h>...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
6cb3974e77524ee2b291919ca6a8b55547bca8e0
2025-01-16T03:04:25+08:00
2,904
https://github.com/sgl-project/sglang/pull/2904
optimize custom allreduce kernel (#2904)
optimize custom allreduce kernel (#2904)
sgl-kernel/src/sgl-kernel/csrc/sgl_kernel_ops.cu
cuda
Apache-2.0
#include "utils.hpp" // trt_reduce using fptr_t = int64_t; fptr_t init_custom_ar(int64_t rank_id, int64_t world_size, const std::vector<fptr_t>& buffers, const std::vector<fptr_t>& barrier_in, const std::vector<fptr_t>& barrier_out); void dispose(fptr_t _fa); void all_reduce(fptr_t _fa, torch::Te...
#include "utils.hpp" // trt_reduce using fptr_t = int64_t; fptr_t init_custom_ar(int64_t rank_id, int64_t world_size, torch::Tensor& rank_data, const std::vector<fptr_t>& buffers, const std::vector<fptr_t>& tmp_result_buffers, const std::vector<fptr_t>& barrier_in, const std...
--- sgl-kernel/src/sgl-kernel/csrc/sgl_kernel_ops.cu +++ sgl-kernel/src/sgl-kernel/csrc/sgl_kernel_ops.cu @@ -2,10 +2,14 @@ // trt_reduce using fptr_t = int64_t; -fptr_t init_custom_ar(int64_t rank_id, int64_t world_size, const std::vector<fptr_t>& buffers, - const std::vector<fptr_t>& barrier_...
8
2
7
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/sgl_kernel_ops.cu). Goal: optimize custom allreduce kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda #include "utils.hpp" // trt_reduce using fptr_t = int64_t; fptr_t init_custom_ar(int64_t rank_id, int64_t...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
6cb3974e77524ee2b291919ca6a8b55547bca8e0
2025-01-16T03:04:25+08:00
2,904
https://github.com/sgl-project/sglang/pull/2904
optimize custom allreduce kernel (#2904)
optimize custom allreduce kernel (#2904)
sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cu
cuda
Apache-2.0
// reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/customAllReduceKernels.cu /* * Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
// reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/customAllReduceKernels.cu /* * Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
--- sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cu +++ sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cu @@ -126,10 +126,10 @@ __syncthreads(); } +template <bool start, bool need_fence = false> __inline__ __device__ void block_barrier(uint32_t** signals, uint32_t const flag, size_t const local_rank, -...
95
68
7
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cu). Goal: optimize custom allreduce kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda // reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/cu...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
6cb3974e77524ee2b291919ca6a8b55547bca8e0
2025-01-16T03:04:25+08:00
2,904
https://github.com/sgl-project/sglang/pull/2904
optimize custom allreduce kernel (#2904)
optimize custom allreduce kernel (#2904)
sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cuh
cuda
Apache-2.0
// reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/plugins/ncclPlugin/allreducePlugin.cpp /* * Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian...
// reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/plugins/ncclPlugin/allreducePlugin.cpp /* * Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian...
--- sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cuh +++ sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cuh @@ -36,6 +36,10 @@ AUTO = 3, }; +struct RankData { + void* ptrs[MAX_RANKS_PER_NODE]; +}; + struct AllReduceParams { size_t elts_size; size_t elts_total; @@ -46,9 +50,11 @@ uint32_t barr...
7
1
7
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/trt_reduce_internal.cuh). Goal: optimize custom allreduce kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda // reference: // https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/plugins/n...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
6cb3974e77524ee2b291919ca6a8b55547bca8e0
2025-01-16T03:04:25+08:00
2,904
https://github.com/sgl-project/sglang/pull/2904
optimize custom allreduce kernel (#2904)
optimize custom allreduce kernel (#2904)
sgl-kernel/src/sgl-kernel/csrc/trt_reduce_kernel.cu
cuda
Apache-2.0
// reference: https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/customAllReduceKernels.h #include <c10/cuda/CUDAStream.h> #include <cassert> #include <iostream> #include <sstream> #include <unordered_map> #include "trt_reduce_internal.cuh" using namespace trt_llm; using fptr_t = int...
// reference: https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/customAllReduceKernels.h #include <c10/cuda/CUDAStream.h> #include <cassert> #include <iostream> #include <sstream> #include <unordered_map> #include "trt_reduce_internal.cuh" using namespace trt_llm; using fptr_t = int...
--- sgl-kernel/src/sgl-kernel/csrc/trt_reduce_kernel.cu +++ sgl-kernel/src/sgl-kernel/csrc/trt_reduce_kernel.cu @@ -12,25 +12,46 @@ using namespace trt_llm; using fptr_t = int64_t; +using IPC_KEY = std::array<uint8_t, sizeof(cudaIpcMemHandle_t)>; class AllReduceMeta { public: - AllReduceMeta(int64_t rank_id, ...
109
8
7
[]
[]
[]
Optimize this cuda kernel file from sglang (sgl-kernel/src/sgl-kernel/csrc/trt_reduce_kernel.cu). Goal: optimize custom allreduce kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda // reference: https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.14/cpp/tensorrt_llm/kernels/customA...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
148254d4db8bf3bffee23710cd1acbd5711ebd1b
2025-01-02T17:11:06+08:00
2,705
https://github.com/sgl-project/sglang/pull/2705
Improve moe reduce sum kernel performance (#2705)
Improve moe reduce sum kernel performance (#2705) Co-authored-by: wunhuang <wunhuang@amd.com>
python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py
triton
Apache-2.0
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, List, Optional, Tuple import torch import triton im...
--- python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py +++ python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py @@ -854,11 +854,17 @@ block_shape=block_shape, ) - torch.sum( - intermediate_cache3.view(*intermediate_cache3.shape), - dim=1, - o...
11
5
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/moe/fused_moe_triton/fused_moe.py). Goal: Improve moe reduce sum kernel performance Target hardware: unspecified Target models: unspecified Current file: ```python # Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e62...
## Motivation torch.sum could not use GPU core efficiency, implement specific kernel to enhance the performance ## Modifications change the base docker image and modify torch.sum to ops.moe_sum in fused_moe.py ## Checklist - [+] Format your code according to the [Contributor Guide](https://github.com/sgl-project/s...
[]
null
null
sglang
7dc66fcb40aa693a299bdcf17247f52cc9deeff0
2024-12-08T17:17:37+08:00
2,394
https://github.com/sgl-project/sglang/pull/2394
Optimize Triton decoding kernel for long context (#2394)
Optimize Triton decoding kernel for long context (#2394)
python/sglang/srt/layers/attention/triton_ops/decode_attention.py
triton
Apache-2.0
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2023-2024 SGLang Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
--- python/sglang/srt/layers/attention/triton_ops/decode_attention.py +++ python/sglang/srt/layers/attention/triton_ops/decode_attention.py @@ -17,8 +17,8 @@ """ # Adapted from -# https://github.com/ModelTC/lightllm/blob/f2a54f0912293f683bf1d1695fd12c4098a5bf82/lightllm/models/llama/triton_kernel/token_attention_no...
314
369
2
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/decode_attention.py). Goal: Optimize Triton decoding kernel for long context Target hardware: unspecified Target models: unspecified Current file: ```python # Copyright 2023-2024 SGLang Team # Licensed under the Apache License...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation As mentioned in https://github.com/sgl-project/sgla...
[]
null
null
sglang
95f93f493a60a4dfdb30aa3d24ba3fc3b8666d3e
2024-12-07T05:18:26-08:00
2,388
https://github.com/sgl-project/sglang/pull/2388
Fp8 MoE optimizations on AMD (#2388)
Fp8 MoE optimizations on AMD (#2388)
python/sglang/srt/layers/fused_moe_triton/fused_moe.py
triton
Apache-2.0
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, Optional, Tuple import torch import triton import t...
# Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vllm/model_executor/layers/fused_moe/fused_moe.py """Fused MoE kernel.""" import functools import json import logging import os from typing import Any, Callable, Dict, Optional, Tuple import torch import triton import t...
--- python/sglang/srt/layers/fused_moe_triton/fused_moe.py +++ python/sglang/srt/layers/fused_moe_triton/fused_moe.py @@ -16,6 +16,7 @@ from sglang.srt.utils import direct_register_custom_op, get_device_name logger = logging.getLogger(__name__) +padding_size = 128 if bool(int(os.getenv("MOE_PADDING", "0"))) else 0 ...
64
21
2
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/fused_moe_triton/fused_moe.py). Goal: Fp8 MoE optimizations on AMD Target hardware: unspecified Target models: unspecified Current file: ```python # Adapted from https://github.com/vllm-project/vllm/blob/a6221a144af772fd1a68fe7e627935dc53e81738/vl...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation <!-- Explain the purpose of this PR and the goals i...
[]
null
null
sglang
087ab832236ef264746d8c75af8cd8752f56ca6b
2024-11-10T18:54:43-08:00
1,980
https://github.com/sgl-project/sglang/pull/1980
[Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel (#1980)
[Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel (#1980)
python/sglang/srt/layers/attention/triton_ops/decode_attention.py
triton
Apache-2.0
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
--- python/sglang/srt/layers/attention/triton_ops/decode_attention.py +++ python/sglang/srt/layers/attention/triton_ops/decode_attention.py @@ -506,6 +506,12 @@ ) num_warps = 4 + + extra_kargs = {} + if is_hip(): + # https://rocm.docs.amd.com/en/docs-6.2.0/how-to/llm-fine-tuning-optimization/op...
7
0
2
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/decode_attention.py). Goal: [Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel Target hardware: unspecified Target models: unspecified Current file: ```python """ Copyright 2023-2024 SGLang Team Li...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Test shows `~0.5%` boost to prefill, `~1.0%` boost ...
[{"scope": "e2e", "hardware": null, "model": "Grok-1", "shape": "b32/i1023/o256", "batch_size": null, "metric": "prefill throughput", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.005, "speedup": 1.005}, {"scope": "e2e", "hardware": null, "model": "Grok-1", "shape": "b...
null
1.0075
sglang
087ab832236ef264746d8c75af8cd8752f56ca6b
2024-11-10T18:54:43-08:00
1,980
https://github.com/sgl-project/sglang/pull/1980
[Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel (#1980)
[Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel (#1980)
python/sglang/srt/layers/fused_moe/fused_moe.py
triton
Apache-2.0
# Adapted from # https://github.com/vllm-project/vllm/tree/v0.5.4/vllm/model_executor/layers/fused_moe """Fused MoE kernel.""" import functools import json import os from typing import Any, Dict, Optional, Tuple import torch import triton import triton.language as tl import vllm.envs as envs from vllm import _custom_o...
# Adapted from # https://github.com/vllm-project/vllm/tree/v0.5.4/vllm/model_executor/layers/fused_moe """Fused MoE kernel.""" import functools import json import os from typing import Any, Dict, Optional, Tuple import torch import triton import triton.language as tl import vllm.envs as envs from vllm import _custom_o...
--- python/sglang/srt/layers/fused_moe/fused_moe.py +++ python/sglang/srt/layers/fused_moe/fused_moe.py @@ -54,6 +54,7 @@ top_k: tl.constexpr, compute_type: tl.constexpr, use_fp8: tl.constexpr, + even_Ks: tl.constexpr, ): """ Implements the fused computation for a Mixture of Experts (MOE) u...
23
7
2
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/fused_moe/fused_moe.py). Goal: [Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel Target hardware: unspecified Target models: unspecified Current file: ```python # Adapted from # https://github.com/vllm-project/vllm/tr...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Test shows `~0.5%` boost to prefill, `~1.0%` boost ...
[{"scope": "e2e", "hardware": null, "model": "Grok-1", "shape": "b32/i1023/o256", "batch_size": null, "metric": "prefill throughput", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.005, "speedup": 1.005}, {"scope": "e2e", "hardware": null, "model": "Grok-1", "shape": "b...
null
1.0075
sglang
67c424cce310d36b7261992ebce00bd218378769
2024-11-07T18:24:02-08:00
1,941
https://github.com/sgl-project/sglang/pull/1941
[Performance, Triton Kernel Args] extend_attention, optimize kern args to _fwd_kernel (#1941)
[Performance, Triton Kernel Args] extend_attention, optimize kern args to _fwd_kernel (#1941)
python/sglang/srt/layers/attention/triton_ops/extend_attention.py
triton
Apache-2.0
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
--- python/sglang/srt/layers/attention/triton_ops/extend_attention.py +++ python/sglang/srt/layers/attention/triton_ops/extend_attention.py @@ -25,6 +25,7 @@ from sglang.srt.layers.attention.triton_ops.prefill_attention import ( context_attention_fwd, ) +from sglang.srt.utils import is_hip is_cuda_available =...
6
0
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/extend_attention.py). Goal: [Performance, Triton Kernel Args] extend_attention, optimize kern args to _fwd_kernel Target hardware: unspecified Target models: unspecified Current file: ```python """ Copyright 2023-2024 SGLang T...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Speedup: `Llama-3.1-8B, TP=8, FP8, b32/i1024`: pref...
[{"scope": "e2e", "hardware": null, "model": "Llama-3.1-8B", "shape": "TP=8, FP8, b32/i1024", "batch_size": 32, "metric": "prefill throughput", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.0282, "speedup": 1.0282}, {"scope": "e2e", "hardware": null, "model": "Grok-1",...
null
1.0252
sglang
2d4ce1b7928d253144bc4b030a643af2b9267b40
2024-10-30T17:33:36-07:00
1,845
https://github.com/sgl-project/sglang/pull/1845
[Performance, Triton Kernel Args] _decode_grouped_softmax_reducev_fwd… (#1845)
[Performance, Triton Kernel Args] _decode_grouped_softmax_reducev_fwd… (#1845)
python/sglang/srt/layers/attention/triton_ops/decode_attention.py
triton
Apache-2.0
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
--- python/sglang/srt/layers/attention/triton_ops/decode_attention.py +++ python/sglang/srt/layers/attention/triton_ops/decode_attention.py @@ -23,6 +23,8 @@ # https://github.com/ModelTC/lightllm/blob/f2a54f0912293f683bf1d1695fd12c4098a5bf82/lightllm/models/llama/triton_kernel/token_attention_softmax_and_reducev.py i...
9
0
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/attention/triton_ops/decode_attention.py). Goal: [Performance, Triton Kernel Args] _decode_grouped_softmax_reducev_fwd… Target hardware: unspecified Target models: unspecified Current file: ```python """ Copyright 2023-2024 SGLang Team Licensed un...
… speedup on ROCm <!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Speedup `_decode_grouped_softmax...
[{"scope": "e2e", "hardware": "MI300x", "model": "Grok-1", "shape": "b32/i1024/o256", "batch_size": 32, "metric": "decode throughput", "unit": "tok/s", "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.01, "speedup": 1.01}]
null
1.01
sglang
5f65e2b830a4cf752ae8ab5739ae7ad958eced83
2024-10-30T12:17:32-07:00
1,836
https://github.com/sgl-project/sglang/pull/1836
[Performance, Hardware] MoE weights padding to AMD MI300x GPUs (#1836)
[Performance, Hardware] MoE weights padding to AMD MI300x GPUs (#1836)
python/sglang/srt/layers/fused_moe/fused_moe.py
triton
Apache-2.0
# Adapted from # https://github.com/vllm-project/vllm/tree/v0.5.4/vllm/model_executor/layers/fused_moe """Fused MoE kernel.""" import functools import json import os from typing import Any, Dict, Optional, Tuple import torch import triton import triton.language as tl import vllm.envs as envs from vllm import _custom_o...
# Adapted from # https://github.com/vllm-project/vllm/tree/v0.5.4/vllm/model_executor/layers/fused_moe """Fused MoE kernel.""" import functools import json import os from typing import Any, Dict, Optional, Tuple import torch import triton import triton.language as tl import vllm.envs as envs from vllm import _custom_o...
--- python/sglang/srt/layers/fused_moe/fused_moe.py +++ python/sglang/srt/layers/fused_moe/fused_moe.py @@ -14,6 +14,7 @@ from vllm.logger import init_logger logger = init_logger(__name__) +padding_size = 128 if bool(int(os.getenv("MOE_PADDING", "0"))) else 0 @triton.jit @@ -263,7 +264,7 @@ expert_ids...
4
3
2
[]
[ "MI300X" ]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/fused_moe/fused_moe.py). Goal: [Performance, Hardware] MoE weights padding to AMD MI300x GPUs Target hardware: MI300X Target models: unspecified Current file: ```python # Adapted from # https://github.com/vllm-project/vllm/tree/v0.5.4/vllm/model_e...
<!-- Thank you for your contribution! We appreciate it. The following guidelines will help improve your pull request and facilitate feedback. If anything is unclear, don't hesitate to submit your pull request and ask the maintainers for assistance. --> ## Motivation Padding MoE weights (last dim) to minimize Memory C...
[{"scope": "e2e", "hardware": "AMD MI300x", "model": "Grok-1", "shape": "b32/i1024/o512", "batch_size": 32, "metric": "latency", "unit": null, "higher_is_better": false, "baseline": null, "optimized": null, "stated_speedup": 1.022, "speedup": 1.022}, {"scope": "e2e", "hardware": "AMD MI300x", "model": "Grok-1", "shape"...
null
1.026
sglang
df191254abc002b3284560d9c4b94214a4656265
2024-08-19T18:23:07+08:00
1,138
https://github.com/sgl-project/sglang/pull/1138
Optimize MLA/GQA/MQA Triton decoding (#1138)
Optimize MLA/GQA/MQA Triton decoding (#1138) Co-authored-by: Yineng Zhang <me@zhyncs.com>
python/sglang/srt/layers/decode_attention.py
triton
Apache-2.0
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
""" Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
--- python/sglang/srt/layers/decode_attention.py +++ python/sglang/srt/layers/decode_attention.py @@ -58,7 +58,6 @@ att_stride_h, kv_group_num: tl.constexpr, BLOCK_DMODEL: tl.constexpr, - BLOCK_DPE: tl.constexpr, BLOCK_N: tl.constexpr, logit_cap: tl.constexpr, ): @@ -77,10 +76,6 @@ cur...
337
49
1
[]
[]
[]
Optimize this triton kernel file from sglang (python/sglang/srt/layers/decode_attention.py). Goal: Optimize MLA/GQA/MQA Triton decoding Target hardware: unspecified Target models: unspecified Current file: ```python """ Copyright 2023-2024 SGLang Team Licensed under the Apache License, Version 2.0 (the "License"); yo...
<!-- Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help. --> ## Motivation Optimize memo...
[]
null
null
flashinfer
c66ced7b31c0ed860ae87b249f55004c9e530d78
2026-10-17T18:50:27-07:00
6,525
https://github.com/flashinfer-ai/flashinfer/pull/6525
perf(cake_deepgemm_mixed_gemm): cooperative mbarrier initialisation, early load start, and a split-K route for the 148-SM M = 16 / N = 4608 / K = 5120 swap-AB configuration (SM100a, SM103a; shipped programs bitwise unchanged, split-K output deterministic) (#6525)
perf(cake_deepgemm_mixed_gemm): cooperative mbarrier initialisation, early load start, and a split-K route for the 148-SM M = 16 / N = 4608 / K = 5120 swap-AB configuration (SM100a, SM103a; shipped programs bitwise unchanged, split-K output deterministic) (#6525) ## Summary Regenerates the mixed FP8 x FP4 GEMM family...
csrc/experimental/deepgemm_mixed_gemm/cake_deepgemm_mixed_gemm_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/experimental/deepgemm_mixed_gemm/cake_deepgemm_mixed_gemm_device_common.cuh +++ csrc/experimental/deepgemm_mixed_gemm/cake_deepgemm_mixed_gemm_device_common.cuh @@ -19,7 +19,8 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels: typedefs, tenso...
17
141
2
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "1.05x", "3 x", "36 x", "128 x", "1.05x", "1.0309x", "1.0465x", "0.9967x", "1.0000x", "1.0219x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_mixed_gemm/cake_deepgemm_mixed_gemm_device_common.cuh). Goal: perf(cake_deepgemm_mixed_gemm): cooperative mbarrier initialisation, early load start, and a split-K route for the 148-SM M = 16 / N = 4608 / K = 5120 swap-AB configuration (SM100a, ...
## Summary Regenerates the mixed FP8 x FP4 GEMM family `flashinfer.experimental.deepgemm_mixed_gemm` (public API `flashinfer.fp8_fp4_gemm.prepare_fp8_fp4_gemm`) for SM100a (B200) and SM103a (GB300) at FlashInfer `22d60b5bb`. One route change reaches the mixed FP8 x FP4 programs in this update. On a 148-SM device (SM10...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "M=16,N=4608,K=5120", "batch_size": 16, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 8.96, "optimized": 8.704, "stated_speedup": null, "speedup": 1.0294}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "M=16,N...
1.0294
null
flashinfer
f09a0f551e2f6f0f1f90434e267c2a2b39f66052
2026-10-17T18:45:23-07:00
6,524
https://github.com/flashinfer-ai/flashinfer/pull/6524
perf(cake_deepgemm_fp4_gemm): cooperative mbarrier initialisation on six routes, early load start on the BN224 / BN256 routes, and a cross-pass epilogue pipeline on the normal BN160 program (SM100a, SM103a; outputs bitwise unchanged) (#6524)
perf(cake_deepgemm_fp4_gemm): cooperative mbarrier initialisation on six routes, early load start on the BN224 / BN256 routes, and a cross-pass epilogue pipeline on the normal BN160 program (SM100a, SM103a; outputs bitwise unchanged) (#6524) ## Summary Regenerates the native FP4 GEMM family `flashinfer.experimental.d...
csrc/experimental/deepgemm_fp4_gemm/cake_deepgemm_fp4_gemm_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
/* * Copyright (c) 2026 by FlashInfer team. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
--- csrc/experimental/deepgemm_fp4_gemm/cake_deepgemm_fp4_gemm_device_common.cuh +++ csrc/experimental/deepgemm_fp4_gemm/cake_deepgemm_fp4_gemm_device_common.cuh @@ -20,7 +20,8 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels: typedefs, tensor-map AB...
17
141
2
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "1.05x", "1.0309x", "1.0422x", "0.9862x", "1.0000x", "1.0177x", "0.9946x", "1.0113x", "1.0000x", "1.0085x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_fp4_gemm/cake_deepgemm_fp4_gemm_device_common.cuh). Goal: perf(cake_deepgemm_fp4_gemm): cooperative mbarrier initialisation on six routes, early load start on the BN224 / BN256 routes, and a cross-pass epilogue pipeline on the normal BN160 prog...
## Summary Regenerates the native FP4 GEMM family `flashinfer.experimental.deepgemm_fp4_gemm` (public API `flashinfer.fp4_gemm.prepare_fp4_gemm`) for SM100a (B200) and SM103a (GB300) at FlashInfer `22d60b5bb`. One exact schedule change reaches the native FP4 GEMM programs in this update. The normal BN160 program (`nor...
[{"scope": "kernel", "hardware": "B200", "model": "model-fp4gemm-l2-m512", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 7.5, "optimized": 6.912, "stated_speedup": null, "speedup": 1.0851}, {"scope": "kernel", "hardware": "GB300", "model": "model-fp4gemm-l2-...
1.0566
null
flashinfer
ccce2135a71dee8d50cb37cb5bacb5656879985e
2026-10-17T12:05:12-07:00
6,518
https://github.com/flashinfer-ai/flashinfer/pull/6518
perf(cake_msa): faster Blackwell MSA uniform-FP8 decode and Top-K programs — epilogue overlap and QK ahead of PV (D-U1, D-U2, D-U2b), streaming Top-K merge network (S2), tradix v2 radix layout, per-architecture topk_select (CAKE-1183 round 10) (#6518)
perf(cake_msa): faster Blackwell MSA uniform-FP8 decode and Top-K programs — epilogue overlap and QK ahead of PV (D-U1, D-U2, D-U2b), streaming Top-K merge network (S2), tradix v2 radix layout, per-architecture topk_select (CAKE-1183 round 10) (#6518) > Developed by the **CAKE team**, this PR re-exports the Cake-gener...
csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh +++ csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh @@ -83,4 +83,3 @@ #include "cake_device_helpers/cake_add_f32x2_74578aa6314ab32b.cuh" #include "cake_device_helpers/cake_fma_f32x2_rn_ftz_abada39162909eda.cuh" #include "cake_device_helpers/cake_tcg...
0
1
2
[ "minimax" ]
[ "B200", "BLACKWELL", "CPU", "GB300", "SM100", "SM103" ]
[ "1.1398×", "1.1355×", "1.1230×", "8 ×", "11 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh). Goal: perf(cake_msa): faster Blackwell MSA uniform-FP8 decode and Top-K programs — epilogue overlap and QK ahead of PV (D-U1, D-U2, D-U2b), streaming Top-K merge network (S2), tradix v2 radix layout, per-architect...
> Developed by the **CAKE team**, this PR re-exports the Cake-generated MiniMax Sparse Attention family for SM100 / SM103 with the CAKE-1183 levers accepted in rounds 9-10 that are not yet on `main`. > Two route groups change: uniform-FP8 decode (D-U1, D-U2, D-U2b) and Top-K select (S2, tradix v2, per-architecture `top...
[{"scope": "kernel", "hardware": "GB300", "model": null, "shape": "FP8 decode, 14 rows (12 uniform-FP8 q8 + 2 legacy q1)", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.747, "speedup": 1.747}, {"scope": "kernel", "hardware": "B2...
1.5491
null
flashinfer
3184bbea6e41290320237fbda2ed87b05661881e
2026-10-16T22:53:55-07:00
6,577
https://github.com/flashinfer-ai/flashinfer/pull/6577
perf(cake_fused_moe): swap-AB cluster split-K GEMM1 forms, grouped dense raster and the CuTe DSL cluster rendezvous fix for the Kimi-K3 MXFP4 SiTU MoE export (cake, cake_cute) (#6577)
perf(cake_fused_moe): swap-AB cluster split-K GEMM1 forms, grouped dense raster and the CuTe DSL cluster rendezvous fix for the Kimi-K3 MXFP4 SiTU MoE export (cake, cake_cute) (#6577) ## Summary Re-renders the two Cake-exported Kimi-K3 MXFP4 SiTU MoE backends from Cake revision `d28a547564d7` with one command. The ba...
flashinfer/fused_moe/cake_cute/cake_mxfp4_situ_moe_kernels.py
cute_dsl
Apache-2.0
# # Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# # Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
--- flashinfer/fused_moe/cake_cute/cake_mxfp4_situ_moe_kernels.py +++ flashinfer/fused_moe/cake_cute/cake_mxfp4_situ_moe_kernels.py @@ -327,6 +327,7 @@ *, pdl_trigger_after_wait: bool | None = None, weight_l2_hint: bool | None = None, + cluster_split: bool = False, ) -> Kernel: """The swap-AB GE...
5
1
4
[ "deepseek", "kimi" ]
[ "B300", "CPU", "HOPPER", "SM103" ]
[ "128 x", "2 x", "0 x", "3 x", "3 x", "51 x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cake_cute/cake_mxfp4_situ_moe_kernels.py). Goal: perf(cake_fused_moe): swap-AB cluster split-K GEMM1 forms, grouped dense raster and the CuTe DSL cluster rendezvous fix for the Kimi-K3 MXFP4 SiTU MoE export (cake, cake_cute) Target hardware: B300...
## Summary Re-renders the two Cake-exported Kimi-K3 MXFP4 SiTU MoE backends from Cake revision `d28a547564d7` with one command. The backends are `flashinfer/fused_moe/cake/` for `backend="cake"` (cuda_cpp) and `flashinfer/fused_moe/cake_cute/` for `backend="cake_cute"` (CuTe DSL). Their device sources live under `csrc...
[{"scope": "e2e", "hardware": "B300", "model": null, "shape": null, "batch_size": null, "metric": "geomean speedup", "unit": null, "higher_is_better": true, "baseline": 1.2527, "optimized": 1.2647, "stated_speedup": null, "speedup": 1.0096}, {"scope": "e2e", "hardware": "B300", "model": null, "shape": null, "batch_size...
null
1.0137
flashinfer
92f2b13f022ed2080c8ab8b6d29c7ce5536c3021
2026-10-16T15:48:46-07:00
6,578
https://github.com/flashinfer-ai/flashinfer/pull/6578
perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) (#6578)
perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) (#6578) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one change, in the split-KV **merge** kernel and its launche...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_binding.cu +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_binding.cu @@ -15,7 +15,7 @@ */ // Generated by the Cake source exporter — do not edit. -// tvm-ffi direct-source launcher for Cake kernel 'kernel_cake_dsv4_nvfp4_a9c628c1d0493dc9608a'. +// tvm-ffi direct-sou...
12
6
3
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.912x", "0.905x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_binding.cu). Goal: perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Current file: ```cu...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one change, in the split-KV **merge** kernel and its launcher. The merge now waits on the decode grid with `griddepcontrol.wait`. It is launched with programmatic stream serialization, ...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h16-k512-t1", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 10.0, "optimized": 8.03, "stated_speedup": null, "speedup": 1.2453}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4", "...
1.1993
null
flashinfer
92f2b13f022ed2080c8ab8b6d29c7ce5536c3021
2026-10-16T15:48:46-07:00
6,578
https://github.com/flashinfer-ai/flashinfer/pull/6578
perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) (#6578)
perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) (#6578) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one change, in the split-KV **merge** kernel and its launche...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_kernel.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_kernel.cu +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_kernel.cu @@ -25,7 +25,7 @@ extern "C" { __global__ __launch_bounds__(THREADS, LAUNCH_MIN_BLOCKS) void -kernel_cake_dsv4_nvfp4_a9c628c1d0493dc9608a(__nv_bfloat16* __restrict__ partial_O, float* __restrict__ par...
2
1
3
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.912x", "0.905x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_merge_kernel.cu). Goal: perf(cake_dsv4): launch the NVFP4 sparse-MLA decode split-KV merge with programmatic dependent launch (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Current file: ```cud...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one change, in the split-KV **merge** kernel and its launcher. The merge now waits on the decode grid with `griddepcontrol.wait`. It is launched with programmatic stream serialization, ...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h16-k512-t1", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 10.0, "optimized": 8.03, "stated_speedup": null, "speedup": 1.2453}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4", "...
1.1993
null
flashinfer
5c5c44c314a6dfe7d918bd7e45a90913168e50e5
2026-10-16T13:17:31-07:00
6,582
https://github.com/flashinfer-ai/flashinfer/pull/6582
perf(cake_ssd_combined): fused exact-scan programs, host routing, look-back chunk-parallel, exactpre family (SM100 / SM103) (#6582)
perf(cake_ssd_combined): fused exact-scan programs, host routing, look-back chunk-parallel, exactpre family (SM100 / SM103) (#6582) ## Summary This PR updates the generated Cake SSDCombined programs for B200 (sm_100a) and GB300 (sm_103a). It also updates the loader `flashinfer/mamba/cake_ssd_combined.py`. The baselin...
csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every chunk-parallel SSDCombined program // (chunkpar_*): the exact-scan arithmetic in grid-barrier-separated phases....
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every chunk-parallel SSDCombined program // (chunkpar_*): the exact-scan arithmetic in grid-barrier-separated phases....
--- csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp +++ csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp @@ -707,6 +707,7 @@ void* p_seq_chunk_cumsum = nullptr; void* p_out_native = nullptr; void* p_s_work = nullptr; + void* ...
37
23
2
[ "mamba", "nemotron" ]
[ "B200", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[ "162 x", "81 x", "12 x" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp). Goal: perf(cake_ssd_combined): fused exact-scan programs, host routing, look-back chunk-parallel, exactpre family (SM100 / SM103) Target hardware: B200, CPU, GB200, GB300, SM100, ...
## Summary This PR updates the generated Cake SSDCombined programs for B200 (sm_100a) and GB300 (sm_103a). It also updates the loader `flashinfer/mamba/cake_ssd_combined.py`. The baseline is the previous release, FlashInfer `36fd76859292ac2ac5aebd0892fc64715569b9da` (PR #6330 merge). The public API is unchanged. ### ...
[{"scope": "kernel", "hardware": "GB300", "model": null, "shape": "perf_varlen_1x1", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 14.176, "optimized": 8.576, "stated_speedup": null, "speedup": 1.653}, {"scope": "kernel", "hardware": "GB300", "model": null, "shape": "perf_va...
1.4115
null
flashinfer
8dad2adc7fb11260230ac14795e179350d79a251
2026-10-16T11:29:52-07:00
5,312
https://github.com/flashinfer-ai/flashinfer/pull/5312
feat(topk_varlen): gvr_2 decode: fused page-table output (page_table), decode latency floor, K=2048 clustered admission, two-CTA slab for unsplit rows (#5312)
feat(topk_varlen): gvr_2 decode: fused page-table output (page_table), decode latency floor, K=2048 clustered admission, two-CTA slab for unsplit rows (#5312) <!-- .github/pull_request_template.md --> ## 📌 Description Decode-side work on the `top_k_varlen` gvr_2 backend: the fused page-table output the DeepSeek-V4 ...
flashinfer/topk_varlen/topk_varlen.py
cute_dsl
Apache-2.0
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
--- flashinfer/topk_varlen/topk_varlen.py +++ flashinfer/topk_varlen/topk_varlen.py @@ -182,6 +182,8 @@ row_starts=None, max_window_len=None, absolute_indices=False, + page_table=None, + page_size=None, compress_ratio=None, next_n=None, pre_idx=None, @@ -195,8 +197,8 @@ """Radix...
114
17
4
[ "deepseek" ]
[ "A100", "B200", "B300", "H100", "L40S", "RTX5080", "SM100", "SM107", "SM120" ]
[ "8.24x", "7.84x", "7.77x", "3.04x", "3.10x", "2.96x", "1.04x", "1.00x", "1.00x", "2.01x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/topk_varlen/topk_varlen.py). Goal: feat(topk_varlen): gvr_2 decode: fused page-table output (page_table), decode latency floor, K=2048 clustered admission, two-CTA slab for unsplit rows Target hardware: A100, B200, B300, H100, L40S, RTX5080, SM100, SM107, ...
<!-- .github/pull_request_template.md --> ## 📌 Description Decode-side work on the `top_k_varlen` gvr_2 backend: the fused page-table output the DeepSeek-V4 decode integration asked for (`page_table=` / `page_size=`: the selected keys leave the kernel as physical KV slots), the register-family latency-floor fixes fo...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=512,N=4096", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 3.05, "optimized": 3.15, "stated_speedup": 0.968, "speedup": 0.9683}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=512,N=8192"...
1.02
null
flashinfer
840fb69656b336da91f0a8131c2e61b907bbc2cf
2026-10-16T17:57:51+08:00
6,544
https://github.com/flashinfer-ai/flashinfer/pull/6544
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544)
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544) <!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensor...
flashinfer/comm/mnnvl_cutedsl/cute_dsl_primitives.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
--- flashinfer/comm/mnnvl_cutedsl/cute_dsl_primitives.py +++ flashinfer/comm/mnnvl_cutedsl/cute_dsl_primitives.py @@ -887,3 +887,44 @@ loc=loc, ip=ip, ) + + +@cute.jit +def load_f32x8(base: cute.Tensor, offset: Int64): + pointer = cute.make_ptr( + Float32, + (base.iterator + offs...
41
0
10
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/comm/mnnvl_cutedsl/cute_dsl_primitives.py). Goal: [Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfe...
<!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensors, kernel launches, and data movement. - **Gated residual RMSNorm fusion:** Fuse RMSNorm, ga...
[]
null
null
flashinfer
840fb69656b336da91f0a8131c2e61b907bbc2cf
2026-10-16T17:57:51+08:00
6,544
https://github.com/flashinfer-ai/flashinfer/pull/6544
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544)
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544) <!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensor...
flashinfer/comm/mnnvl_cutedsl/kernel_ll/device_kernels.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
--- flashinfer/comm/mnnvl_cutedsl/kernel_ll/device_kernels.py +++ flashinfer/comm/mnnvl_cutedsl/kernel_ll/device_kernels.py @@ -747,9 +747,6 @@ self.weight_bias = weight_bias self.add_residual = add_residual self.write_residual_output = write_residual_output - # When False the collecti...
24
23
10
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/comm/mnnvl_cutedsl/kernel_ll/device_kernels.py). Goal: [Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by Flas...
<!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensors, kernel launches, and data movement. - **Gated residual RMSNorm fusion:** Fuse RMSNorm, ga...
[]
null
null
flashinfer
840fb69656b336da91f0a8131c2e61b907bbc2cf
2026-10-16T17:57:51+08:00
6,544
https://github.com/flashinfer-ai/flashinfer/pull/6544
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544)
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544) <!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensor...
flashinfer/comm/mnnvl_cutedsl/kernel_ll/protocol.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
--- flashinfer/comm/mnnvl_cutedsl/kernel_ll/protocol.py +++ flashinfer/comm/mnnvl_cutedsl/kernel_ll/protocol.py @@ -139,6 +139,65 @@ class LLProtocolState: contribution_mailbox: SymmetricBuffer stage_state: torch.Tensor + + +def create_ll_state( + group: dist.ProcessGroup, + tp_size: int, + rank: in...
61
36
10
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/comm/mnnvl_cutedsl/kernel_ll/protocol.py). Goal: [Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer...
<!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensors, kernel launches, and data movement. - **Gated residual RMSNorm fusion:** Fuse RMSNorm, ga...
[]
null
null
flashinfer
840fb69656b336da91f0a8131c2e61b907bbc2cf
2026-10-16T17:57:51+08:00
6,544
https://github.com/flashinfer-ai/flashinfer/pull/6544
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544)
[Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations (#6544) <!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensor...
flashinfer/comm/mnnvl_cutedsl/runtime.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
--- flashinfer/comm/mnnvl_cutedsl/runtime.py +++ flashinfer/comm/mnnvl_cutedsl/runtime.py @@ -77,5 +77,51 @@ ) +def is_dense_on(t: torch.Tensor, device: torch.device, alignment: int) -> bool: + """Contiguous, on ``device``, with an ``alignment``-byte base address.""" + return t.device == device and t.is_...
46
0
10
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/comm/mnnvl_cutedsl/runtime.py). Goal: [Feat] Support Muse-Spark-Open with fused normalization and TP/EP MoE optimizations Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer team. # # ...
<!-- .github/pull_request_template.md --> ## 📌 Description Add fused normalization and TP/EP MoE kernels for Muse Spark that combine normalization, gating, residual operations, and communication to reduce intermediate tensors, kernel launches, and data movement. - **Gated residual RMSNorm fusion:** Fuse RMSNorm, ga...
[]
null
null
flashinfer
6eb3221c969fc681f64bf5b04a34e534abd427e9
2026-10-16T00:58:11-07:00
6,133
https://github.com/flashinfer-ai/flashinfer/pull/6133
perf(norm): SM107 launch config for add_rmsnorm_fp4quant (#6133)
perf(norm): SM107 launch config for add_rmsnorm_fp4quant (#6133) <!-- .github/pull_request_template.md --> ## 📌 Description On SM107, `add_rmsnorm_fp4quant` (CuTe-DSL) does not get the measured SM100/SM103 config. It falls back to the generic launch heuristic in `_compute_launch_config`. This PR adds an SM107 branc...
flashinfer/cute_dsl/add_rmsnorm_fp4quant.py
cute_dsl
Apache-2.0
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
--- flashinfer/cute_dsl/add_rmsnorm_fp4quant.py +++ flashinfer/cute_dsl/add_rmsnorm_fp4quant.py @@ -329,6 +329,25 @@ return threads_per_row, num_threads @staticmethod + def _compute_sm107_launch_config( + H_per_cta: int, + elem_size: int, + ) -> tuple[int, int]: + """Select th...
22
0
1
[]
[ "GB300", "SM100", "SM103", "SM107" ]
[ "2.92x", "0.44x", "1.31x", "4.36x", "0.32x", "1.43x", "3.23x", "0.39x", "1.31x", "4.16x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/add_rmsnorm_fp4quant.py). Goal: perf(norm): SM107 launch config for add_rmsnorm_fp4quant Target hardware: GB300, SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the...
<!-- .github/pull_request_template.md --> ## 📌 Description On SM107, `add_rmsnorm_fp4quant` (CuTe-DSL) does not get the measured SM100/SM103 config. It falls back to the generic launch heuristic in `_compute_launch_config`. This PR adds an SM107 branch, `_compute_sm107_launch_config`, next to the SM100/SM103 one. *...
[{"scope": "kernel", "hardware": "SM107", "model": null, "shape": "NVFP4 M2048 H4096", "batch_size": 2048, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 2.92, "speedup": 2.92}, {"scope": "kernel", "hardware": "SM107", "model": null, "shape": "NVFP4 M...
2.8
null
flashinfer
73437da87c5d80b1f4903e513f526c310a3133ca
2026-10-15T14:39:03-07:00
6,552
https://github.com/flashinfer-ai/flashinfer/pull/6552
perf(cake_kimi_k3_fp8_projection): round 11 — static / grid-stride GEMM schedules, PDL-after-weights loader, 19 table adoptions (SM100a, SM103a) (#6552)
perf(cake_kimi_k3_fp8_projection): round 11 — static / grid-stride GEMM schedules, PDL-after-weights loader, 19 table adoptions (SM100a, SM103a) (#6552) ## Summary This is round 11 of the Cake `kimi_k3_fp8_projection` generated-program export: the FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA families, o...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not e...
1
1
4
[ "kimi" ]
[ "B200", "B300", "CPU", "GB300", "SM100", "SM103" ]
[ "3 ×", "3 ×", "1.10×", "1.070 ×", "1.0 ×", "1.0 ×", "1.0405 ×", "1.04032 ×", "0.99614 ×", "1.0 ×" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_kimi_k3_fp8_projection): round 11 — static / grid-stride GEMM schedules, PDL-after-weights loader, 19 table adoptions (SM100a, ...
## Summary This is round 11 of the Cake `kimi_k3_fp8_projection` generated-program export: the FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA families, on SM100 (B200) and SM103 (GB300). The contract has not changed: - 352 rows per GPU. - 198 perf rows: 22 (N, K) families × M in {1, 8, 64, 256, 512, 1024,...
[{"scope": "kernel", "hardware": "SM103", "model": null, "shape": "N=50,K=28,M=1024", "batch_size": 1024, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.624, "optimized": 39.088, "stated_speedup": null, "speedup": 1.0905}, {"scope": "kernel", "hardware": "SM103", "model": null, "shape": "N...
1.0514
null
flashinfer
042162c8ed2237d4a82404f82032652e25b5c735
2026-10-15T14:28:12-07:00
6,530
https://github.com/flashinfer-ai/flashinfer/pull/6530
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530)
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530) ## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below ...
csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_device_common.cuh +++ csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_device_common.cuh @@ -19,32 +19,28 @@ // Generated by cake.codegen — do not edit. // Shared devi...
16
20
6
[ "deepseek" ]
[ "BLACKWELL", "CPU", "RTX5090", "SM120" ]
[ "1.23×", "1.20×", "1.21×", "1.19×", "2.5×", "8 ×", "6 ×", "8 ×", "8 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_device_common.cuh). Goal: perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg Target hardwa...
## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below are Cake / DeepGEMM time (0.8151 and 0.8354); r2 without the hint measured 1.21× / 1.19×. Best shapes reach 2.5× (32-head `next_n` 5 at batch 25...
[{"scope": "kernel", "hardware": "RTX 5090", "model": null, "shape": null, "batch_size": null, "metric": "kernel time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.8151, "stated_speedup": 1.23, "speedup": 1.2268}, {"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": null,...
1.1951
null
flashinfer
042162c8ed2237d4a82404f82032652e25b5c735
2026-10-15T14:28:12-07:00
6,530
https://github.com/flashinfer-ai/flashinfer/pull/6530
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530)
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530) ## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below ...
csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_binding.cu +++ csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_binding.cu @@ -18,30 +18,27 @@ // DeepGEMM portions are licensed...
14
22
6
[ "deepseek" ]
[ "BLACKWELL", "CPU", "RTX5090", "SM120" ]
[ "1.23×", "1.20×", "1.21×", "1.19×", "2.5×", "8 ×", "6 ×", "8 ×", "8 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_binding.cu). Goal: perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg...
## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below are Cake / DeepGEMM time (0.8151 and 0.8354); r2 without the hint measured 1.21× / 1.19×. Best shapes reach 2.5× (32-head `next_n` 5 at batch 25...
[{"scope": "kernel", "hardware": "RTX 5090", "model": null, "shape": null, "batch_size": null, "metric": "kernel time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.8151, "stated_speedup": 1.23, "speedup": 1.2268}, {"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": null,...
1.1951
null
flashinfer
042162c8ed2237d4a82404f82032652e25b5c735
2026-10-15T14:28:12-07:00
6,530
https://github.com/flashinfer-ai/flashinfer/pull/6530
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530)
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530) ## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below ...
csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_kernel.cu
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_kernel.cu +++ csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_kernel.cu @@ -30,108 +30,107 @@ extern "C" { -__global__ -__l...
94
95
6
[ "deepseek" ]
[ "BLACKWELL", "CPU", "RTX5090", "SM120" ]
[ "1.23×", "1.20×", "1.21×", "1.19×", "2.5×", "8 ×", "6 ×", "8 ×", "8 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_f48f226f30690af34bd7_kernel.cu). Goal: perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg ...
## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below are Cake / DeepGEMM time (0.8151 and 0.8354); r2 without the hint measured 1.21× / 1.19×. Best shapes reach 2.5× (32-head `next_n` 5 at batch 25...
[{"scope": "kernel", "hardware": "RTX 5090", "model": null, "shape": null, "batch_size": null, "metric": "kernel time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.8151, "stated_speedup": 1.23, "speedup": 1.2268}, {"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": null,...
1.1951
null
flashinfer
042162c8ed2237d4a82404f82032652e25b5c735
2026-10-15T14:28:12-07:00
6,530
https://github.com/flashinfer-ai/flashinfer/pull/6530
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530)
perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg (#6530) ## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below ...
csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_host_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_host_common.cuh +++ csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_host_common.cuh @@ -39,8 +39,9 @@ TVM_FFI_CHECK_CUDA_ERROR(cudaGetDeviceCount(&device_count)); i...
3
2
6
[ "deepseek" ]
[ "BLACKWELL", "CPU", "RTX5090", "SM120" ]
[ "1.23×", "1.20×", "1.21×", "1.19×", "2.5×", "8 ×", "6 ×", "8 ×", "8 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_sm120_paged_mqa_logits/generated/cake_deepgemm_sm120_paged_mqa_logits_host_common.cuh). Goal: perf(cake_deepgemm): SM120 paged MQA-logits indexer: batch-aware Q-atom programs, DeepGEMM block-table cache, num_heads metadata kwarg Target hardware...
## Summary > **Speedup over DeepGEMM (geomean of the 216 shapes per device, kernel time, measured with `max_context_hint`): RTX 5090 1.23×, RTX PRO 6000 1.20×.** Ratios below are Cake / DeepGEMM time (0.8151 and 0.8354); r2 without the hint measured 1.21× / 1.19×. Best shapes reach 2.5× (32-head `next_n` 5 at batch 25...
[{"scope": "kernel", "hardware": "RTX 5090", "model": null, "shape": null, "batch_size": null, "metric": "kernel time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.8151, "stated_speedup": 1.23, "speedup": 1.2268}, {"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": null,...
1.1951
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/shim/block_scaled.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """SM107 (Rubin) block-scaled swap-AB inference mega-MoE frontend. Wraps the vendored generic inference and GenPhase kernels behind the standard two-entry-point mega contract: - :func:`get_symm_buffer_fo...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """SM107 (Rubin) block-scaled swap-AB inference mega-MoE frontend. Wraps the vendored generic inference and GenPhase kernels behind the standard two-entry-point mega contract: - :func:`get_symm_buffer_fo...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/shim/block_scaled.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/shim/block_scaled.py @@ -364,15 +364,38 @@ if self.kernel_variant == "genphase": if self.padded_tokens_per_rank > 1024: raise ValueError("Ge...
30
7
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/shim/block_scaled.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwen, kimi, glm Current file: ```python # Copyright (c) 2026 NV...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/communication/nvlink_domain/token_comm.py
cute_dsl
Apache-2.0
"""Metadata-push routing and fused non-deterministic token communication.""" import dataclasses import os from typing import Callable, ClassVar, Literal, Optional, Tuple, Union import cuda.bindings.driver as cuda import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils from...
"""Metadata-push routing and fused non-deterministic token communication.""" import dataclasses import os from typing import Callable, ClassVar, Literal, Optional, Tuple, Union import cuda.bindings.driver as cuda import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils from...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/communication/nvlink_domain/token_comm.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/communication/nvlink_domain/token_comm.py @@ -703,6 +703,11 @@ @cute.jit def _broadcast_sizes_to_peers(self, smem_expert_c...
49
15
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/communication/nvlink_domain/token_comm.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwen, kimi, glm Current file: ...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/helpers/ptx_helpers.py
cute_dsl
Apache-2.0
"""Minimal inline-PTX primitives required by the greenfield NVFP4 kernels.""" from typing import Optional import cutlass import cutlass.cute as cute from cutlass._mlir import ir from cutlass._mlir.dialects import arith, llvm, vector from cutlass.cutlass_dsl import Float32, Int32, Int64, T, dsl_user_op TmaCacheHintE...
"""Minimal inline-PTX primitives required by the greenfield NVFP4 kernels.""" from typing import Optional import cutlass import cutlass.cute as cute from cutlass._mlir import ir from cutlass._mlir.dialects import arith, llvm, vector from cutlass.cutlass_dsl import Float32, Int32, Int64, T, dsl_user_op TmaCacheHintE...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/helpers/ptx_helpers.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/helpers/ptx_helpers.py @@ -749,3 +749,18 @@ "stg_f32", "tma_load_1d", ] + + +@dsl_user_op +def barrier_sync_unaligned(barrier_id, num_threads,...
15
0
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/helpers/ptx_helpers.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwen, kimi, glm Current file: ```python """Minima...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop.py
cute_dsl
Apache-2.0
"""Mainloop component for the Rubin block-scaled swap-AB FC12 kernel.""" from typing import ClassVar, Optional, Tuple import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils as utils import cutlass.utils.blackwell_helpers as sm100_utils import cutlass.utils.blockscaled_layo...
"""Mainloop component for the Rubin block-scaled swap-AB FC12 kernel.""" from typing import ClassVar, Optional, Tuple import cutlass from .....helpers.ptx_helpers import barrier_sync_unaligned import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils as utils import cutlass.utils.blackwell_...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop.py @@ -3,6 +3,7 @@ from typing import ...
2
1
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwe...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop_gen_specialized.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Mainloop component for the Rubin generation-phase block-scaled swap-AB FC12 kernel. Three properties separate this from the two mainloops it descends from. FC1's token operand arrives by ``TILE_GATHER...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Mainloop component for the Rubin generation-phase block-scaled swap-AB FC12 kernel. Three properties separate this from the two mainloops it descends from. FC1's token operand arrives by ``TILE_GATHER...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop_gen_specialized.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop_gen_specialized.py @@ -...
98
41
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_fc12_mainloop_gen_specialized.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target model...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel.py
cute_dsl
Apache-2.0
"""Fused pull-dispatch MegaMoE kernel composition for Rubin.""" from typing import ClassVar, Optional, Tuple import cuda.bindings.driver as cuda import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils as utils import cutlass.utils.blockscaled_layout as blockscaled_utils fr...
"""Fused pull-dispatch MegaMoE kernel composition for Rubin.""" from typing import ClassVar, Optional, Tuple import cuda.bindings.driver as cuda import cutlass from .....helpers.ptx_helpers import barrier_sync_unaligned import cutlass.cute as cute import cutlass.pipeline as pipeline import cutlass.utils as utils imp...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel.py @@ -5,6 +5,7 @@ import cuda.bin...
9
3
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, q...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel_gen_specialized.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Generation-phase MegaMoE kernel composition for Rubin. Specialised for few tokens per rank and large expert parallelism. The narrowing buys a short communication path: ``GenphaseTokenComm`` is a separa...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Generation-phase MegaMoE kernel composition for Rubin. Specialised for few tokens per rank and large expert parallelism. The narrowing buys a short communication path: ``GenphaseTokenComm`` is a separa...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel_gen_specialized.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel_gen_specialized.py ...
95
47
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/block_scaled_swap_ab_mega_moe_kernel_gen_specialized.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target mod...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/token_comm_gen_specialized.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Genphase MegaMoE token communication. The design target is a single cross-rank round trip on the critical path. Both outbound transfers leave at kernel entry with no routing dependency: exchange CTA...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Genphase MegaMoE token communication. The design target is a single cross-rank round trip on the critical path. Both outbound transfers leave at kernel entry with no routing dependency: exchange CTA...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/token_comm_gen_specialized.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/token_comm_gen_specialized.py @@ -202,6 +202,7 @@ refine_work_counter_region:...
117
47
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/token_comm_gen_specialized.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwen, kimi,...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
0a0cecb50b1250f0b609a9c51f1b25816ba073b8
2026-10-14T16:58:06-07:00
6,447
https://github.com/flashinfer-ai/flashinfer/pull/6447
perf(moe): optimize sparse SM107 MegaMoE decode (#6447)
perf(moe): optimize sparse SM107 MegaMoE decode (#6447) <!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening spar...
flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/topk_reduce.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Device combine reduce: collapse per-(token, topk) fc2 cells into one row. The combine step writes one fc2 output per ``(token, topk)`` cell; this reduces over the topk axis into the token-centric ``(to...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause """Device combine reduce: collapse per-(token, topk) fc2 cells into one row. The combine step writes one fc2 output per ``(token, topk)`` cell; this reduces over the topk axis into the token-centric ``(to...
--- flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/topk_reduce.py +++ flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/topk_reduce.py @@ -164,9 +164,10 @@ # topk loop (small enough to not bloat registers; a CTA-...
26
6
10
[ "deepseek", "qwen", "kimi", "glm" ]
[ "BLACKWELL", "CPU", "H100", "SM107" ]
[ "1.73×", "1.51×", "1.104×", "1.058×", "1.037×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/moe_ep/kernel_src/sm107/next_cutedsl_megamoe/src/sources/kernel_src/rubin/inference/mega/topk_reduce.py). Goal: perf(moe): optimize sparse SM107 MegaMoE decode Target hardware: BLACKWELL, CPU, H100, SM107 Target models: deepseek, qwen, kimi, glm Current f...
<!-- .github/pull_request_template.md --> ## 📌 Description Sparse decode often reserves a large token capacity while only a few routes are live. This optimizes the existing SM107 Generic and GenPhase MegaMoE paths by avoiding invalid-slot work, shortening sparse metadata handling and reducing tail synchronization ov...
[{"scope": "kernel", "hardware": "SM107", "model": "Qwen-shaped", "shape": "H=2560,I=640,E=512,top-k=10,capacity=1024", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.29, "optimized": 24.49, "stated_speedup": 1.73, "speedup": 1.7268}, {"scope": "kernel", "hardware": "SM107...
1.104
null
flashinfer
fd14b3056d0c1aa72c80fc9c35c8493f38c5a9a5
2026-10-14T14:18:10-07:00
6,267
https://github.com/flashinfer-ai/flashinfer/pull/6267
perf(trtllm-gen decode): keep CGA reduction for small-batch long-KV decode; fuse v_scale in the decode wrapper (#6267)
perf(trtllm-gen decode): keep CGA reduction for small-batch long-KV decode; fuse v_scale in the decode wrapper (#6267) <!-- .github/pull_request_template.md --> ## 📌 Description This PR makes three changes to trtllm-gen paged decode, one per commit. Commit 3 extends commit 1 to multi-token (spec-decode) queries. #...
include/flashinfer/trtllm/fmha/fmhaKernels.cuh
cuda
Apache-2.0
/* * Copyright (c) 2020-2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
/* * Copyright (c) 2020-2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless r...
--- include/flashinfer/trtllm/fmha/fmhaKernels.cuh +++ include/flashinfer/trtllm/fmha/fmhaKernels.cuh @@ -81,6 +81,9 @@ public: static constexpr int kDynamicNumTokensPerPageThreshold = 128; static constexpr int kDynamicNumTokensPerPageKernelKey = 128; + // Max KV splits per CGA cluster, and the per-CTA KV leng...
18
0
2
[ "deepseek" ]
[ "B200", "B300", "BLACKWELL", "GB300", "SM107" ]
[ "0.98x", "1.02x", "1.12x", "0.99x", "1.29x", "1.00x", "1.26x", "1.01x", "1.29x", "1.00x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/trtllm/fmha/fmhaKernels.cuh). Goal: perf(trtllm-gen decode): keep CGA reduction for small-batch long-KV decode; fuse v_scale in the decode wrapper Target hardware: B200, B300, BLACKWELL, GB300, SM107 Target models: deepseek Current file: ```cuda /* *...
<!-- .github/pull_request_template.md --> ## 📌 Description This PR makes three changes to trtllm-gen paged decode, one per commit. Commit 3 extends commit 1 to multi-token (spec-decode) queries. ### 1. `perf(trtllm-gen decode)`: clamp >16 KV splits to the CGA reduction limit `computeCtaAndClusterConfig` sets the K...
[{"scope": "kernel", "hardware": "SM107", "model": null, "shape": "batch=1,KV=9216,q_heads=64,kv_heads=8,head_dim=64,dtype=fp8", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.12, "speedup": 1.12}, {"scope": "kernel", "hardware": "B...
1.1
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_device_helpers/cake_desc_encode_a56f6347f8d37641.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_device_helpers/cake_desc_encode_a56f6347f8d37641.cuh +++ csrc/cake_device_helpers/cake_desc_encode_a56f6347f8d37641.cuh @@ -1,6 +1,5 @@ /* - * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) 2023 by FlashInfer team. * * Licensed u...
2
7
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_desc_encode_a56f6347f8d37641.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Cur...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_device_helpers/cake_tcgen05_commit_3d61b9d0baed52f9.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_device_helpers/cake_tcgen05_commit_3d61b9d0baed52f9.cuh +++ csrc/cake_device_helpers/cake_tcgen05_commit_3d61b9d0baed52f9.cuh @@ -1,6 +1,5 @@ /* - * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) 2023 by FlashInfer team. * * Lice...
5
8
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_tcgen05_commit_3d61b9d0baed52f9.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek ...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_device_helpers/cake_tcgen05_cp_32x128b_warpx4_889f02d6972847cb.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_device_helpers/cake_tcgen05_cp_32x128b_warpx4_889f02d6972847cb.cuh +++ csrc/cake_device_helpers/cake_tcgen05_cp_32x128b_warpx4_889f02d6972847cb.cuh @@ -1,6 +1,5 @@ /* - * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) 2023 by FlashIn...
3
9
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_tcgen05_cp_32x128b_warpx4_889f02d6972847cb.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models:...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_device_helpers/cake_tmem_ld_x16_a9ed61940fdba296.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_device_helpers/cake_tmem_ld_x16_a9ed61940fdba296.cuh +++ csrc/cake_device_helpers/cake_tmem_ld_x16_a9ed61940fdba296.cuh @@ -1,6 +1,5 @@ /* - * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 + * Copyright (c) 2023 by FlashInfer team. * * Licensed u...
9
13
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_tmem_ld_x16_a9ed61940fdba296.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Cur...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_device_helpers/cake_tmem_ld_x8_38cb8e5e57da80f2.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_device_helpers/cake_tmem_ld_x8_38cb8e5e57da80f2.cuh +++ csrc/cake_device_helpers/cake_tmem_ld_x8_38cb8e5e57da80f2.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the ...
1
1
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_tmem_ld_x8_38cb8e5e57da80f2.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Curr...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_decode_persistent_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_decode_persistent_binding.cu +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_decode_persistent_binding.cu @@ -15,7 +15,7 @@ */ // Generated by the Cake source exporter — do not edit. -// tvm-ffi direct-source launcher for Cake kernel 'kernel_cake_dsv4_nvfp4_90f6e277b0c617925053'...
10
10
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_decode_persistent_binding.cu). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek ...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh @@ -50,8 +50,8 @@ #include <math_constants.h> #include "cake_device_helpers/cake_elect_sync_1ee8cd91025d8932.cuh" #include "cake_device_helpers/cake_mbarrier_init_15e581aef85ee586.cuh" +#include "c...
6
6
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Current fi...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
ba87b199601858ce18ba919369cbedad7d917708
2026-10-14T12:19:41-07:00
6,357
https://github.com/flashinfer-ai/flashinfer/pull/6357
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357)
perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) (#6357) ## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvf...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_host_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_host_common.cuh +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_host_common.cuh @@ -74,7 +74,7 @@ // 4D TMA descriptor for buffer 'tmap_q' — compiled from the // descriptor's std.Expr global_dim/global_strides/checks record. -inline CUtensorMap EncodeTma_tmap_q_2a50cecfe3df(const...
242
242
10
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103" ]
[ "0.98x", "0.99x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_host_common.cuh). Goal: perf(cake_dsv4): overlap the next tile's V transform with PV in the NVFP4 sparse-MLA decode persistent member (SM100/SM103) Target hardware: B200, CPU, GB300, SM100, SM103 Target models: deepseek Current file...
## Summary Re-exports the SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode family (`backend="cake"`, `kv_cache_format="nvfp4"`) with one kernel change in the **persistent member** (`nvfp4_decode_persistent`, the member that serves the 128-head throughput rows): the next tile's V transform now runs under the current t...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "C-h128-k512-t128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 33.54, "optimized": 32.35, "stated_speedup": null, "speedup": 1.0368}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V4...
1.0356
null
flashinfer
87ef73934ef61e4d85444b91aeaa8e0df667f6ae
2026-10-14T01:35:40-07:00
6,463
https://github.com/flashinfer-ai/flashinfer/pull/6463
perf(cake_msa): faster Blackwell MSA prefill programs — union-route selection census, Q-resident long-route order, two-stage folded-GQA rings, shared-TMEM QK/PV issue order, tile interleave, host-side cu_seqlens_k removal (rounds 4–9 levers) (#6463)
perf(cake_msa): faster Blackwell MSA prefill programs — union-route selection census, Q-resident long-route order, two-stage folded-GQA rings, shared-TMEM QK/PV issue order, tile interleave, host-side cu_seqlens_k removal (rounds 4–9 levers) (#6463) > Developed by the **CAKE team**, this PR regenerates the **prefill**...
csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh +++ csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels: typedefs, tensor-map ABI -// and the union of their compiler help...
1
1
3
[ "minimax" ]
[ "B200", "BLACKWELL", "CPU", "GB300", "SM100", "SM103" ]
[ "2.7×", "2.7×", "1.76×", "1.94×", "1.18×", "1.11×", "1.04×", "1.08×", "0.39×", "0.59×" ]
Optimize this cuda kernel file from flashinfer (csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh). Goal: perf(cake_msa): faster Blackwell MSA prefill programs — union-route selection census, Q-resident long-route order, two-stage folded-GQA rings, shared-TMEM QK/PV issue order, tile interleave, host-side cu_seq...
> Developed by the **CAKE team**, this PR regenerates the **prefill** routes of the Cake-generated MiniMax Sparse Attention family for > SM100 / SM103 with every prefill lever the CAKE-1183 ceiling round accepted since the family's last prefill delivery (#6397): the paged > `first_topk` rows run **1.8–2.7× faster** (2....
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "N=8192", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 965, "optimized": 411, "stated_speedup": null, "speedup": 2.3479}, {"scope": "kernel", "hardware": "GB300", "model": null, "shape": "N=8192", "batch_size"...
1.616
null
flashinfer
13149016323d04a2ff439a151c564dde7406e611
2026-10-13T20:57:28-07:00
6,410
https://github.com/flashinfer-ai/flashinfer/pull/6410
perf(cake_msa): faster Blackwell MSA Top-K select programs (keq fold, 32-query instance, plan refit; bit-identical indices) (#6410)
perf(cake_msa): faster Blackwell MSA Top-K select programs (keq fold, 32-query instance, plan refit; bit-identical indices) (#6410) > Developed by the **CAKE team**, the Top-K select programs in this PR **outperform** the programs they replace on 3 of the 6 distinct > frozen Top-K shapes per architecture (1.18–2.28×: ...
csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh +++ csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels: typedefs, tensor-map ABI -// and the union of their compiler help...
1
1
3
[ "kimi", "minimax" ]
[ "B200", "BLACKWELL", "GB300", "SM100", "SM103", "SM120", "SM121" ]
[ "2.28×", "4x" ]
Optimize this cuda kernel file from flashinfer (csrc/blackwell_msa/cake_blackwell_msa_device_common.cuh). Goal: perf(cake_msa): faster Blackwell MSA Top-K select programs (keq fold, 32-query instance, plan refit; bit-identical indices) Target hardware: B200, BLACKWELL, GB300, SM100, SM103, SM120, SM121 Target models: ...
> Developed by the **CAKE team**, the Top-K select programs in this PR **outperform** the programs they replace on 3 of the 6 distinct > frozen Top-K shapes per architecture (1.18–2.28×: the `t1024` shape now served by the new 32-query instance, the tied `t256` shape now > served by the new all-equal-fold instance, and...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "t1024", "batch_size": null, "metric": "performance ratio", "unit": null, "higher_is_better": true, "baseline": 1, "optimized": 1.1832, "stated_speedup": null, "speedup": 1.1832}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "t1024", "b...
1.488
null
flashinfer
6326e4aa99289906090f50449e696752e95ac95c
2026-10-13T17:09:32-07:00
6,194
https://github.com/flashinfer-ai/flashinfer/pull/6194
perf(cake_fused_moe): Kimi-K3 NVFP4 SiTU experts SM103 single-token fused quant+route FC1 (#6194)
perf(cake_fused_moe): Kimi-K3 NVFP4 SiTU experts SM103 single-token fused quant+route FC1 (#6194) ## Kimi-K3 NVFP4 SiTU experts: SM103 single-token fused quant+route FC1 (re-authored on #6135) Route the SM103 (B300) single-token row of the Kimi-K3 NVFP4 SiTU experts to a fused FC1 program that performs the activation...
csrc/fused_moe/cake_kimi_k3_situ/cake_kimi_k3_nvfp4_situ_routed_moe_a264957aa770dad84302_kernel.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/fused_moe/cake_kimi_k3_situ/cake_kimi_k3_nvfp4_situ_routed_moe_a264957aa770dad84302_kernel.cu +++ csrc/fused_moe/cake_kimi_k3_situ/cake_kimi_k3_nvfp4_situ_routed_moe_a264957aa770dad84302_kernel.cu @@ -966,12 +966,8 @@ extern __shared__ __align__(1024) char smem_raw[]; int smem; -#if __CUDA_ARCH__ =...
0
4
3
[ "deepseek", "kimi" ]
[ "B300", "HOPPER", "SM100", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/fused_moe/cake_kimi_k3_situ/cake_kimi_k3_nvfp4_situ_routed_moe_a264957aa770dad84302_kernel.cu). Goal: perf(cake_fused_moe): Kimi-K3 NVFP4 SiTU experts SM103 single-token fused quant+route FC1 Target hardware: B300, HOPPER, SM100, SM103 Target models: deepseek, kimi ...
## Kimi-K3 NVFP4 SiTU experts: SM103 single-token fused quant+route FC1 (re-authored on #6135) Route the SM103 (B300) single-token row of the Kimi-K3 NVFP4 SiTU experts to a fused FC1 program that performs the activation quantization and the expert routing inside the FC1 prologue, so a call runs three kernels (FC1, FC...
[]
null
null
flashinfer
f77a20b2afb9664b5d2be3b452ee460fa61e2f64
2026-10-13T15:30:35-07:00
6,413
https://github.com/flashinfer-ai/flashinfer/pull/6413
perf(cake_deepgemm): fused 32-head FP8 routes, next_n-4 paged text, static windows (SM100a, SM103a) (#6413)
perf(cake_deepgemm): fused 32-head FP8 routes, next_n-4 paged text, static windows (SM100a, SM103a) (#6413) ## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head FP8 / FP4 and 64-head FP8 MQA logits, paged FP8 MQA logits) from the producer tip of the third convergence round against the stock DeepGEMM...
csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh +++ csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh @@ -19,7 +19,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels:...
1
1
4
[]
[ "B200", "SM100", "SM103" ]
[ "1.98x", "64 x", "32 x", "64 x", "64 x", "64 x", "256 x", "2 x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh). Goal: perf(cake_deepgemm): fused 32-head FP8 routes, next_n-4 paged text, static windows (SM100a, SM103a) Target hardware: B200, SM100, SM103 Target models: unspecified Current fi...
## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head FP8 / FP4 and 64-head FP8 MQA logits, paged FP8 MQA logits) from the producer tip of the third convergence round against the stock DeepGEMM kernels (`fp8_mqa_logits` / `fp8_paged_mqa_logits`, sgl-deep-gemm 0.2.0), rebuilt on `main` after the v9 sin...
[{"scope": "kernel", "hardware": "SM100a", "model": null, "shape": "Q=37,K=4137", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.92, "speedup": 1.92}, {"scope": "kernel", "hardware": "SM103a", "model": null, "shape": "Q=37,K=4137", ...
1.0488
null
flashinfer
ea5f740951ac45f8a73aed036e28a5a9c7e57838
2026-10-13T13:11:55-07:00
6,433
https://github.com/flashinfer-ai/flashinfer/pull/6433
perf(cake_kimi_k3_fp8_projection): round 10 — cluster split-K pair GEMM, prefetched stream-K, 128×384 pair-tile GEMM, interleaved confirm protocol and dispatch-table re-tune (SM100a, SM103a) (#6433)
perf(cake_kimi_k3_fp8_projection): round 10 — cluster split-K pair GEMM, prefetched stream-K, 128×384 pair-tile GEMM, interleaved confirm protocol and dispatch-table re-tune (SM100a, SM103a) (#6433) ## Summary Round 10 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not e...
7
6
4
[ "kimi" ]
[ "CPU", "SM100", "SM103" ]
[ "128 ×", "3 ×", "1.0168 ×", "1.0322\n×", "24 ×", "1.043×", "5 ×", "0.9617 ×", "1×", "0.964×" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_kimi_k3_fp8_projection): round 10 — cluster split-K pair GEMM, prefetched stream-K, 128×384 pair-tile GEMM, interleaved confirm...
## Summary Round 10 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA families — 22 families, 352 contract rows per GPU: 198 perf rows = 22 (N, K) families × M in {1, 8, 64, 256, 512, 1024, 2048, 4096, 16384} and 154 correctness rows at M 3 / 129 ...
[{"scope": "kernel", "hardware": "SM103", "model": null, "shape": "N=5,K=28,M=2048", "batch_size": 2048, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 24.432, "optimized": 23.616, "stated_speedup": null, "speedup": 1.0346}, {"scope": "kernel", "hardware": "SM100", "model": null, "shape": "N=...
1.0498
null
flashinfer
5c4058bd9b75967de947971d7f28d36bd600d888
2026-10-13T11:07:21+08:00
5,168
https://github.com/flashinfer-ai/flashinfer/pull/5168
perf(sm12x): optimize fused MoE kernels (#5168)
perf(sm12x): optimize fused MoE kernels (#5168) <!-- .github/pull_request_template.md --> ## 📌 Description Optimize the existing SM12x fused FP4 MoE backends, particularly workloads whose intermediate dimension is not a multiple of 128. The changes reduce padded weight storage, routing overhead, unnecessary data mo...
flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_micro_kernel.py
cute_dsl
Apache-2.0
""" MoEMicroKernel — micro-scheduled routed W4A4 MoE kernel for SM120/SM121. Ported from the b12x kernel library to FlashInfer. This is the micro control-plane fusion step for decode workloads: keep the proven FC1/FC2 compute body, but pull the route/pack frontend into the same resident kernel, using precompacted rou...
""" MoEMicroKernel — micro-scheduled routed W4A4 MoE kernel for SM120/SM121. Ported from the b12x kernel library to FlashInfer. This is the micro control-plane fusion step for decode workloads: keep the proven FC1/FC2 compute body, but pull the route/pack frontend into the same resident kernel, using precompacted rou...
--- flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_micro_kernel.py +++ flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_micro_kernel.py @@ -682,9 +682,33 @@ ) sfa_tensor = cute.make_tensor(sfa_ptr, sfa_layout) - # Single SF tensor for concatenated w13 (gate+up scale factors) + # w1...
72
34
8
[ "qwen" ]
[ "BLACKWELL", "SM120" ]
[ "0.55 ×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_micro_kernel.py). Goal: perf(sm12x): optimize fused MoE kernels Target hardware: BLACKWELL, SM120 Target models: qwen Current file: ```python """ MoEMicroKernel — micro-scheduled routed W4A4 MoE kernel for SM120/SM12...
<!-- .github/pull_request_template.md --> ## 📌 Description Optimize the existing SM12x fused FP4 MoE backends, particularly workloads whose intermediate dimension is not a multiple of 128. The changes reduce padded weight storage, routing overhead, unnecessary data movement, and synchronization while preserving supp...
[{"scope": "e2e", "hardware": "NVIDIA Blackwell SM120", "model": null, "shape": "E=512, H=2560, I=320, topk=10", "batch_size": 64, "metric": "latency", "unit": "\u00b5s", "higher_is_better": false, "baseline": 744.27, "optimized": 480.38, "stated_speedup": null, "speedup": 1.5493}, {"scope": "e2e", "hardware": "NVIDIA ...
null
1.3624
flashinfer
1ed137d9f8283e55c4388782cde4b54eeabad2ea
2026-10-12T15:50:16-07:00
6,375
https://github.com/flashinfer-ai/flashinfer/pull/6375
perf(cake_minimax_h3_varlen_attention): round-13 per-plan program dispatch -- dynamic ticket scheduling for long multi-wave plans (SM100a, SM103a) and a publish-tail cut for the SM100a static plans (#6375)
perf(cake_minimax_h3_varlen_attention): round-13 per-plan program dispatch -- dynamic ticket scheduling for long multi-wave plans (SM100a, SM103a) and a publish-tail cut for the SM100a static plans (#6375) ## Summary `flashinfer.experimental.minimax_h3_varlen_attention` (Cake backend, SM100a/SM103a BF16 packed-varlen...
flashinfer/experimental/minimax_h3_varlen_attention/csrc/cake_minimax_h3_varlen_attention/cake_minimax_h3_varlen_attention_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/minimax_h3_varlen_attention/csrc/cake_minimax_h3_varlen_attention/cake_minimax_h3_varlen_attention_device_common.cuh +++ flashinfer/experimental/minimax_h3_varlen_attention/csrc/cake_minimax_h3_varlen_attention/cake_minimax_h3_varlen_attention_device_common.cuh @@ -16,7 +16,7 @@ // Genera...
5
4
3
[ "minimax" ]
[ "B200", "GB300", "SM100", "SM103" ]
[ "1.01x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/minimax_h3_varlen_attention/csrc/cake_minimax_h3_varlen_attention/cake_minimax_h3_varlen_attention_device_common.cuh). Goal: perf(cake_minimax_h3_varlen_attention): round-13 per-plan program dispatch -- dynamic ticket scheduling for long multi-wav...
## Summary `flashinfer.experimental.minimax_h3_varlen_attention` (Cake backend, SM100a/SM103a BF16 packed-varlen attention), round 13 on top of #6328. The host planner now selects one of three bitwise-identical programs per plan: - **Dynamic whole-unit ticket scheduling** (`DYN_SCHED` + ticket prefetch) for plans wit...
[{"scope": "kernel", "hardware": "SM103a", "model": null, "shape": null, "batch_size": null, "metric": "performance ratio", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": 1.004, "stated_speedup": 1.004, "speedup": 1.004}, {"scope": "kernel", "hardware": "SM103a", "model": null, "shape": null, "ba...
1.0055
null
flashinfer
ae312f7cc1723b06fda5168105ade0f328ee47d8
2026-10-12T00:07:46-07:00
6,323
https://github.com/flashinfer-ai/flashinfer/pull/6323
perf(cake_gdn): SM107a FP64-free q-scale, fp32 T=1 tilev32 band, chunked-parallel prefill route and native packed-KDA tile64 variant (#6323)
perf(cake_gdn): SM107a FP64-free q-scale, fp32 T=1 tilev32 band, chunked-parallel prefill route and native packed-KDA tile64 variant (#6323) Follow-up to #6238 (merged). Same backend family as #5467 (@Vinnie6167, FYI). Cake GDN decode on SM107a (Rubin, CC 10.7) only; SM100a / SM103a kernel text is unchanged. ## What ...
csrc/gdn/cake/cake_gdn_device_common.cuh
cuda
Apache-2.0
// Copyright (c) 2026 by FlashInfer team. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
// Copyright (c) 2026 by FlashInfer team. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
--- csrc/gdn/cake/cake_gdn_device_common.cuh +++ csrc/gdn/cake/cake_gdn_device_common.cuh @@ -229,3 +229,8 @@ "f"(src[24]), "f"(src[25]), "f"(src[26]), "f"(src[27]), "f"(src[28]), "f"(src[29]), "f"(src[30]), "f"(src[31])); } + +// Added after the shipped text (append-only delivery): device help...
5
0
7
[]
[ "B200", "BLACKWELL", "CPU", "GB300", "SM100", "SM103", "SM107", "SM90" ]
[ "0.92×", "6 ×", "7 ×", "4 ×", "5 ×", "1.0×", "1.44×", "1.041×" ]
Optimize this cuda kernel file from flashinfer (csrc/gdn/cake/cake_gdn_device_common.cuh). Goal: perf(cake_gdn): SM107a FP64-free q-scale, fp32 T=1 tilev32 band, chunked-parallel prefill route and native packed-KDA tile64 variant Target hardware: B200, BLACKWELL, CPU, GB300, SM100, SM103, SM107, SM90 Target models: un...
Follow-up to #6238 (merged). Same backend family as #5467 (@Vinnie6167, FYI). Cake GDN decode on SM107a (Rubin, CC 10.7) only; SM100a / SM103a kernel text is unchanged. ## What this PR does Every Cake GDN decode kernel scales q by `(float)((double)x * SCALE)`. On SM107a that FP64 multiply is now lowered to an exact F...
[{"scope": "e2e", "hardware": "R200", "model": null, "shape": null, "batch_size": 128, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 1.014, "optimized": 1.132, "stated_speedup": null, "speedup": 1.1164}, {"scope": "e2e", "hardware": "R200", "model": null, "shape": null, "batch_size": 1, "metr...
1.0484
1.2538
flashinfer
b05599ede4371d7e9b6b8a89800da351ef6450c4
2026-10-11T23:34:03-07:00
6,325
https://github.com/flashinfer-ai/flashinfer/pull/6325
perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-export (#6325)
perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-export (#6325) ## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from t...
csrc/cake_device_helpers/cake_mbarrier_wait_relaxed_hint_6c7a98f6a495754c.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/cake_device_helpers/cake_mbarrier_wait_relaxed_hint_6c7a98f6a495754c.cuh +++ csrc/cake_device_helpers/cake_mbarrier_wait_relaxed_hint_6c7a98f6a495754c.cuh @@ -24,17 +24,17 @@ // Exact unqualified CTA wait used by source schedules whose PTX intentionally // omits the acquire qualifier while retaining a type...
13
13
4
[ "deepseek" ]
[ "CPU", "SM100", "SM103" ]
[ "1.09x", "1.05x", "0.87x", "1.03x", "0.98x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_device_helpers/cake_mbarrier_wait_relaxed_hint_6c7a98f6a495754c.cuh). Goal: perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-export Target h...
## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from the producer tip that closes the current DeepSeek-V3.2 lightning-indexer performance round on SM100a / SM103a, onto `main`. The `cake_dsa_indexer` programs regenerated at the same produce...
[{"scope": "kernel", "hardware": "SM103a", "model": null, "shape": null, "batch_size": null, "metric": "performance ratio", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 5.02, "speedup": 5.02}, {"scope": "kernel", "hardware": "SM100a", "model": null, "shape": null, "batc...
3.425
1.735
flashinfer
b05599ede4371d7e9b6b8a89800da351ef6450c4
2026-10-11T23:34:03-07:00
6,325
https://github.com/flashinfer-ai/flashinfer/pull/6325
perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-export (#6325)
perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-export (#6325) ## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from t...
csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh +++ csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh @@ -19,7 +19,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels:...
1
1
4
[ "deepseek" ]
[ "CPU", "SM100", "SM103" ]
[ "1.09x", "1.05x", "0.87x", "1.03x", "0.98x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh). Goal: perf(cake_deepgemm): single-launch 32-head FP8 / FP4 dense MQA logits routes, per-architecture 64-head programs and new paged next_n = 2 geometries; catalog schema v9 re-expo...
## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from the producer tip that closes the current DeepSeek-V3.2 lightning-indexer performance round on SM100a / SM103a, onto `main`. The `cake_dsa_indexer` programs regenerated at the same produce...
[{"scope": "kernel", "hardware": "SM103a", "model": null, "shape": null, "batch_size": null, "metric": "performance ratio", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 5.02, "speedup": 5.02}, {"scope": "kernel", "hardware": "SM100a", "model": null, "shape": null, "batc...
3.425
1.735
flashinfer
7eb9b13b70534b1a1b0e6745b0b5bbfbc2783999
2026-10-11T23:33:36-07:00
6,327
https://github.com/flashinfer-ai/flashinfer/pull/6327
perf(cake_dsa_indexer): SM103a dispatch set for the wide, paired and split scan programs of the DSA indexer top-k (SM100a programs unchanged) (#6327)
perf(cake_dsa_indexer): SM103a dispatch set for the wide, paired and split scan programs of the DSA indexer top-k (SM100a programs unchanged) (#6327) ## Summary Re-export of the `cake_dsa_indexer` top-k programs (scan, merge, finalize and finalize-rank roles) from the producer tip that closes the current DeepSeek-V3....
flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh +++ flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of t...
2
2
2
[ "deepseek" ]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh). Goal: perf(cake_dsa_indexer): SM103a dispatch set for the wide, paired and split scan programs of the DSA indexer top-k (SM100a programs unchanged) Target hardwa...
## Summary Re-export of the `cake_dsa_indexer` top-k programs (scan, merge, finalize and finalize-rank roles) from the producer tip that closes the current DeepSeek-V3.2 lightning-indexer round. On **SM103a** the scan programs of the wide, paired-l6 and split kinds take the dispatch set measured for them this round --...
[{"scope": "kernel", "hardware": "SM103a", "model": "DeepSeek-V3.2", "shape": null, "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.4359, "optimized": 0.4113, "stated_speedup": null, "speedup": 1.0598}, {"scope": "kernel", "hardware": "SM100a", "model": "DeepSeek-V3.2", "...
1.0116
null
flashinfer
23dc1d5957558a04d03d5bc0003a09c0035ed776
2026-10-11T14:37:02-07:00
6,335
https://github.com/flashinfer-ai/flashinfer/pull/6335
perf(cake_kimi_k3_fp8_projection): round 9 — cluster split-K re-association cells, K=128 / 192-wide GEMM cells, fused-shape re-tune, quant_done barrier (SM100a, SM103a) (#6335)
perf(cake_kimi_k3_fp8_projection): round 9 — cluster split-K re-association cells, K=128 / 192-wide GEMM cells, fused-shape re-tune, quant_done barrier (SM100a, SM103a) (#6335) ## Summary Round 9 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA ...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not e...
5
5
4
[ "kimi" ]
[ "B200", "GB300", "SM100", "SM103" ]
[ "24 ×", "1.00×", "1.00×", "1.00×", "1.10×", "1.10×", "1.10×" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_kimi_k3_fp8_projection): round 9 — cluster split-K re-association cells, K=128 / 192-wide GEMM cells, fused-shape re-tune, quan...
## Summary Round 9 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA families — 22 families, 352 contract rows per GPU: 198 perf rows = 22 (N, K) families × M in {1, 8, 64, 256, 512, 1024, 2048, 4096, 16384} and 154 correctness rows at M 3 / 129 /...
[{"scope": "kernel", "hardware": "SM103", "model": null, "shape": "1,28,512", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 17.44, "optimized": 14.24, "stated_speedup": null, "speedup": 1.2247}, {"scope": "kernel", "hardware": "SM100", "model": null, "shape": "1,28,2048",...
1.1125
null
flashinfer
adae6837f1962a5790162be0ee45e014659cbbf8
2026-10-11T14:28:04-07:00
6,318
https://github.com/flashinfer-ai/flashinfer/pull/6318
perf(cake_deepgemm): per-architecture 64-head FP8 dense texts, static-preferred windows and two new paged geometries (SM100a, SM103a) (#6318)
perf(cake_deepgemm): per-architecture 64-head FP8 dense texts, static-preferred windows and two new paged geometries (SM100a, SM103a) (#6318) ## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from the producer tip of the convergence round ag...
csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
--- csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh +++ csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh @@ -19,7 +19,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels:...
4
3
3
[]
[ "SM100", "SM103" ]
[ "64 x", "64 x", "32 x", "64 x", "64 x", "256 x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_dense_mqa/generated/cake_deepgemm_dense_mqa_device_common.cuh). Goal: perf(cake_deepgemm): per-architecture 64-head FP8 dense texts, static-preferred windows and two new paged geometries (SM100a, SM103a) Target hardware: SM100, SM103 Target mod...
## Summary Re-export of the `deepgemm_dense_mqa` family (dense 32-head and 64-head FP8 / FP4 MQA logits, paged FP8 MQA logits) from the producer tip of the convergence round against the stock DeepGEMM kernels (`fp8_mqa_logits` / `fp8_paged_mqa_logits`, sgl-deep-gemm 0.2.0). Catalog schema `dense_mqa.v7` -> `dense_mqa....
[{"scope": "kernel", "hardware": "SM100a", "model": null, "shape": null, "batch_size": null, "metric": "paired CUPTI timing ratio", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": 1.018, "stated_speedup": null, "speedup": 1.018}, {"scope": "kernel", "hardware": "SM103a", "model": null, "shape": nu...
1.017
null
flashinfer
36fd76859292ac2ac5aebd0892fc64715569b9da
2026-10-11T14:18:41-07:00
6,330
https://github.com/flashinfer-ai/flashinfer/pull/6330
perf(cake_ssd_combined): exact-scan epilogue ring + calibrated schedule-variant rule (SM100 / SM103) (#6330)
perf(cake_ssd_combined): exact-scan epilogue ring + calibrated schedule-variant rule (SM100 / SM103) (#6330) ## Summary Fifth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.mamba.ssd_combined_fwd`), SM100 (B200)...
csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every exact-scan SSDCombined program // (exact_*). // The nine CAKE_SSD_* placeholders (program name, preprocess modu...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every exact-scan SSDCombined program // (exact_*). // The nine CAKE_SSD_* placeholders (program name, preprocess modu...
--- csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp +++ csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp @@ -565,7 +565,7 @@ uint64_t global_dim[4] = {(uint64_t)(d1), (uint64_t)(d2), (uint64_t)(d3), (uint64_t)(d4)}; TVM_FFI_CHECK(global_dim[0] > 0 && global_d...
1
1
2
[ "mamba", "nemotron" ]
[ "B200", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[ "2 x", "4 x", "63 x", "65 x", "2 x", "2 x", "3 x", "1 x", "1 x", "8 x" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp). Goal: perf(cake_ssd_combined): exact-scan epilogue ring + calibrated schedule-variant rule (SM100 / SM103) Target hardware: B200, CPU, GB200, GB300, SM100, SM103 Target models: mamba, nemotron ...
## Summary Fifth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.mamba.ssd_combined_fwd`), SM100 (B200) and SM103 (GB300). Exact arithmetic is preserved: every kernel change is a schedule / data-movement / issue-o...
[{"scope": "e2e", "hardware": "GB200", "model": "Nemotron-H-8B-Reasoning-128K", "shape": "BF16 TP1", "batch_size": null, "metric": "accuracy", "unit": null, "higher_is_better": true, "baseline": 0.885, "optimized": 0.885, "stated_speedup": null, "speedup": 1.0}, {"scope": "e2e", "hardware": "GB200", "model": "Nemotron-...
1.0444
1.0025
flashinfer
1f28b952d8bd75e380e03d0c55e2c00055b527a5
2026-10-10T15:16:52-07:00
6,217
https://github.com/flashinfer-ai/flashinfer/pull/6217
perf(cake_kimi_k3_fp8_projection): round 8 — bit-exact dispatch-cell convergence, K=128 GEMM operand hand-off, cached launch receipts, short-row TMA-store fix (SM100a, SM103a) (#6217)
perf(cake_kimi_k3_fp8_projection): round 8 — bit-exact dispatch-cell convergence, K=128 GEMM operand hand-off, cached launch receipts, short-row TMA-store fix (SM100a, SM103a) (#6217) ## Summary Round 8 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of the Kimi-K3 KDA...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not e...
24
223
4
[ "kimi" ]
[ "B200", "GB300", "SM100", "SM103" ]
[ "2.21x", "1.02x", "1.00x", "2.43x", "1.05x", "3.47x", "1.02x", "2.21x", "1.04x", "1.06x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_kimi_k3_fp8_projection): round 8 — bit-exact dispatch-cell convergence, K=128 GEMM operand hand-off, cached launch receipts, sh...
## Summary Round 8 of the Cake `kimi_k3_fp8_projection` generated-program export (FP8 block-scaled projection GEMMs of the Kimi-K3 KDA / MLA families — 22 families: TP8 and TP1 of q_proj, fused_qkvg, in_proj_qkvgfab, f_a, f_b, b_proj (KDA) and kv_a, fused_qkv_a, q_b, kv_b, o_proj (MLA) — on SM100 + SM103). Output stay...
[{"scope": "kernel", "hardware": "GB300", "model": null, "shape": null, "batch_size": null, "metric": "geomean performance ratio", "unit": null, "higher_is_better": true, "baseline": 1.0164, "optimized": 1.0222, "stated_speedup": null, "speedup": 1.0057}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": ...
1.0204
1.0504
flashinfer
817555dd1f9203bf64f997bf024cd0219f063c6a
2026-10-10T01:03:39-07:00
6,291
https://github.com/flashinfer-ai/flashinfer/pull/6291
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291)
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291) ## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.m...
csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every chunk-parallel SSDCombined program // (chunkpar_*): the exact-scan arithmetic in grid-barrier-separated phases....
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every chunk-parallel SSDCombined program // (chunkpar_*): the exact-scan arithmetic in grid-barrier-separated phases....
--- csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp +++ csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp @@ -349,7 +349,7 @@ TVM_FFI_CHECK(global_dim[0] > 0 && global_dim[1] > 0 && global_dim[2] > 0 && global_dim[3] > 0, ValueError)...
4
4
4
[ "mamba", "nemotron" ]
[ "B200", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[ "2 ×", "1 x", "32768 x", "1 x", "1 x", "2048 x", "4 x", "2048 x", "1.09x", "1.06x" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_chunk_parallel_sequence.cpp). Goal: perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) Target hardware: B200, CPU, GB200, G...
## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.mamba.ssd_combined_fwd`), SM100 (B200) and SM103 (GB300). Exact arithmetic is preserved: every kernel change is a schedule / data-movement / issue...
[{"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v1x128", "batch_size": null, "metric": "scan time", "unit": null, "higher_is_better": true, "baseline": 0.918, "optimized": null, "stated_speedup": 1.05, "speedup": 1.05}, {"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v8x128", "batch...
1.33
1.212
flashinfer
817555dd1f9203bf64f997bf024cd0219f063c6a
2026-10-10T01:03:39-07:00
6,291
https://github.com/flashinfer-ai/flashinfer/pull/6291
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291)
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291) ## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.m...
csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every exact-scan SSDCombined program // (exact_*). // The nine CAKE_SSD_* placeholders (program name, preprocess modu...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every exact-scan SSDCombined program // (exact_*). // The nine CAKE_SSD_* placeholders (program name, preprocess modu...
--- csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp +++ csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp @@ -346,7 +346,7 @@ TVM_FFI_CHECK(global_dim[0] > 0 && global_dim[1] > 0 && global_dim[2] > 0 && global_dim[3] > 0, ValueError) << "TMA descriptor for...
4
4
4
[ "mamba", "nemotron" ]
[ "B200", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[ "2 ×", "1 x", "32768 x", "1 x", "1 x", "2048 x", "4 x", "2048 x", "1.09x", "1.06x" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp). Goal: perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) Target hardware: B200, CPU, GB200, GB300, SM100, SM...
## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.mamba.ssd_combined_fwd`), SM100 (B200) and SM103 (GB300). Exact arithmetic is preserved: every kernel change is a schedule / data-movement / issue...
[{"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v1x128", "batch_size": null, "metric": "scan time", "unit": null, "higher_is_better": true, "baseline": 0.918, "optimized": null, "stated_speedup": 1.05, "speedup": 1.05}, {"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v8x128", "batch...
1.33
1.212
flashinfer
817555dd1f9203bf64f997bf024cd0219f063c6a
2026-10-10T01:03:39-07:00
6,291
https://github.com/flashinfer-ai/flashinfer/pull/6291
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291)
perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) (#6291) ## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.m...
flashinfer/mamba/ssd_combined.py
cute_dsl
Apache-2.0
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
""" Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
--- flashinfer/mamba/ssd_combined.py +++ flashinfer/mamba/ssd_combined.py @@ -269,8 +269,10 @@ returns a token-major view of it; the Cake kernels write the token-major ``[batch, seqlen, nheads, headdim]`` buffer directly and return it. The Cake backend also accepts any positive ``seqlen``, including few...
75
4
4
[ "mamba", "nemotron" ]
[ "B200", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[ "2 ×", "1 x", "32768 x", "1 x", "1 x", "2048 x", "4 x", "2048 x", "1.09x", "1.06x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/mamba/ssd_combined.py). Goal: perf(cake_ssd_combined): round-4 exact-scan schedule, chunk-parallel host model and graph-capturable prepared submission (SM100 / SM103) Target hardware: B200, CPU, GB200, GB300, SM100, SM103 Target models: mamba, nemotron Cu...
## Summary Fourth performance round of the Cake Mamba2 SSD combined prefill (`flashinfer.mamba.SSDCombined(backend="cake")` and its Cake-only functional wrapper `flashinfer.mamba.ssd_combined_fwd`), SM100 (B200) and SM103 (GB300). Exact arithmetic is preserved: every kernel change is a schedule / data-movement / issue...
[{"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v1x128", "batch_size": null, "metric": "scan time", "unit": null, "higher_is_better": true, "baseline": 0.918, "optimized": null, "stated_speedup": 1.05, "speedup": 1.05}, {"scope": "kernel", "hardware": "SM100", "model": null, "shape": "v8x128", "batch...
1.33
1.212
flashinfer
0926b61815fac88384d8fafb18599a103600fec9
2026-10-09T22:57:39-07:00
6,195
https://github.com/flashinfer-ai/flashinfer/pull/6195
perf(cake_dsa_indexer): one lowering of the weighted ReLU sum in the DSA indexer top-k programs (SM100a, SM103a, SM107a) (#6195)
perf(cake_dsa_indexer): one lowering of the weighted ReLU sum in the DSA indexer top-k programs (SM100a, SM103a, SM107a) (#6195) ## Summary Re-export of the `cake_dsa_indexer` top-k programs (the program set delivered by #6230: scan, merge, finalize and finalize-rank roles) with a single lowering of the per-row weigh...
flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh +++ flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh @@ -50,8 +50,6 @@ #include "cake_device_helpers/cake_elect_sync_1ee8cd91025d8932.cuh" #include...
4
4
2
[]
[ "SM100", "SM103", "SM107" ]
[ "0.65\nx" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/cake_dsa_indexer/csrc/cake_dsa_indexer_topk/cake_dsa_indexer_topk_device_common.cuh). Goal: perf(cake_dsa_indexer): one lowering of the weighted ReLU sum in the DSA indexer top-k programs (SM100a, SM103a, SM107a) Target hardware: SM100, SM103, SM1...
## Summary Re-export of the `cake_dsa_indexer` top-k programs (the program set delivered by #6230: scan, merge, finalize and finalize-rank roles) with a single lowering of the per-row weighted ReLU sum. The delivered scan programs form |a| in CUDA C (`make_float2(fabsf(a.x), fabsf(a.y))`) and then run the packed `add....
[{"scope": "kernel", "hardware": "SM100a", "model": null, "shape": "dsa_RC3", "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 26.9564, "optimized": 27.219, "stated_speedup": null, "speedup": 0.9904}, {"scope": "kernel", "hardware": "SM100a", "model": null, "shape": null, "b...
1.0005
null
flashinfer
d217e8915e32949b49d93bbda467ffef0e8d1329
2026-10-08T14:25:38-07:00
6,206
https://github.com/flashinfer-ai/flashinfer/pull/6206
perf(cake_ssd_combined): preprocess, exact-scan and chunk-parallel prefill improvements (SM100 / SM103) (#6206)
perf(cake_ssd_combined): preprocess, exact-scan and chunk-parallel prefill improvements (SM100 / SM103) (#6206) # FI PR draft (round 3) — title: `perf(cake_ssd_combined): preprocess, exact-scan and chunk-parallel prefill improvements (SM100 / SM103)` <!-- PUBLIC TEXT: no issue-tracker ids, no tracker links, no interna...
csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every SSDCombined program. The nine // CAKE_SSD_* placeholders (program name, preprocess module/kernel/threads, // m...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. // CAKE_SSD_TEMPLATE: one launcher for every exact-scan SSDCombined program // (exact_*). // The nine CAKE_SSD_* placeholders (program name, preprocess modu...
--- csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp +++ csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp @@ -3,8 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ // Generated by cake.runtime.host_shim — do not edit. -// CAKE_SSD_TEMPLATE: one launcher for ever...
5
4
2
[ "deepseek", "mamba", "nemotron" ]
[ "B200", "B300", "CPU", "GB200", "GB300", "HOPPER", "SM100", "SM103" ]
[ "2.42×", "3.15×" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_mamba_ssd_combined/generated/host/mamba_ssd_combined_sequence.cpp). Goal: perf(cake_ssd_combined): preprocess, exact-scan and chunk-parallel prefill improvements (SM100 / SM103) Target hardware: B200, B300, CPU, GB200, GB300, HOPPER, SM100, SM103 Target models: ...
# FI PR draft (round 3) — title: `perf(cake_ssd_combined): preprocess, exact-scan and chunk-parallel prefill improvements (SM100 / SM103)` <!-- PUBLIC TEXT: no issue-tracker ids, no tracker links, no internal cluster/lease names, no dev-log text. grep before posting. --> ## Summary Third performance round of the Cake ...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "single-chunk", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 19, "optimized": 4, "stated_speedup": null, "speedup": 4.75}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "single-chunk", "ba...
4.875
2.7875
flashinfer
99828461c2ee49b9e242a6ad4b0a6e9f0f576a78
2026-10-07T20:34:03-07:00
6,215
https://github.com/flashinfer-ai/flashinfer/pull/6215
perf(cake_dsv4): dequantize the NVFP4 decode cache with the hardware QMUL4 via PTX ISA 9.4; require CUDA 13.4 (SM100/SM103) (#6215)
perf(cake_dsv4): dequantize the NVFP4 decode cache with the hardware QMUL4 via PTX ISA 9.4; require CUDA 13.4 (SM100/SM103) (#6215) ## Summary Stacked on #6190 (merge that first; this PR's own change is its top commit). Same SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode kernels and the same host path as #6190; on...
csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh +++ csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh @@ -372,56 +372,18 @@ : "r"(tmem_addr)); } -// Portable (public-PTX) QMUL4 for the DSv4 NVFP4 cache: E2M1 x E4M3 -> E4M3 with one rounding. -// Per 16-value block the eight possible magnit...
13
51
8
[ "deepseek" ]
[ "B200", "BLACKWELL", "GB300", "SM100", "SM103", "SM120" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_nvfp4_device_common.cuh). Goal: perf(cake_dsv4): dequantize the NVFP4 decode cache with the hardware QMUL4 via PTX ISA 9.4; require CUDA 13.4 (SM100/SM103) Target hardware: B200, BLACKWELL, GB300, SM100, SM103, SM120 Target models: deepsee...
## Summary Stacked on #6190 (merge that first; this PR's own change is its top commit). Same SM100 / SM103 DeepSeek-V4 NVFP4 sparse-MLA decode kernels and the same host path as #6190; one generated helper changes (the shared device header's QMUL4 helper, `cake_dsv4_qmul4_portable` -> `cake_dsv4_qmul4`, so the six NVFP...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V3", "shape": null, "batch_size": null, "metric": "source/export geomean", "unit": null, "higher_is_better": true, "baseline": 0.952, "optimized": 0.999, "stated_speedup": null, "speedup": 1.0494}, {"scope": "kernel", "hardware": "GB300", "model": "DeepSeek-V3...
1.0086
null
flashinfer
5dc3cd06c57465c48f6c6f7317f642b6eb683083
2026-10-06T17:37:40-07:00
6,109
https://github.com/flashinfer-ai/flashinfer/pull/6109
perf(cake_kimi_k3_latent_moe): plan from the device SM count; qualify 148- and 152-SM parts (SM100a, SM103a) (#6109)
perf(cake_kimi_k3_latent_moe): plan from the device SM count; qualify 148- and 152-SM parts (SM100a, SM103a) (#6109) ## Summary The Kimi-K3 LatentMoE front / tail backend (`flashinfer.experimental.kimi_k3_latent_moe`) planned every route for a fixed 148-SM device and refused other parts. It now derives every plan fro...
flashinfer/experimental/kimi_k3_latent_moe/csrc/cake_kimi_k3_latent_moe/cake_kimi_k3_latent_moe_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_latent_moe/csrc/cake_kimi_k3_latent_moe/cake_kimi_k3_latent_moe_device_common.cuh +++ flashinfer/experimental/kimi_k3_latent_moe/csrc/cake_kimi_k3_latent_moe/cake_kimi_k3_latent_moe_device_common.cuh @@ -73,12 +73,6 @@ :: "r"(mbar_addr), "r"(count) : "memory"); } -__devic...
42
42
3
[ "kimi" ]
[ "B200", "B300", "CPU", "GB200", "GB300", "SM100", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_latent_moe/csrc/cake_kimi_k3_latent_moe/cake_kimi_k3_latent_moe_device_common.cuh). Goal: perf(cake_kimi_k3_latent_moe): plan from the device SM count; qualify 148- and 152-SM parts (SM100a, SM103a) Target hardware: B200, B300, CPU, GB200,...
## Summary The Kimi-K3 LatentMoE front / tail backend (`flashinfer.experimental.kimi_k3_latent_moe`) planned every route for a fixed 148-SM device and refused other parts. It now derives every plan from the device's `multi_processor_count` and admits a device when its SM count is in the qualified set `{148, 152}` and ...
[]
null
null
flashinfer
8565c8358e7bc3048c7411f566173a562f15d2a0
2026-10-06T15:13:24-07:00
6,129
https://github.com/flashinfer-ai/flashinfer/pull/6129
perf(cake_deepgemm_mega_gate): 16-way split-K cluster reduction with a compensated token-parallel combine on the small-M routing-gate routes (SM100a, SM103a) (#6129)
perf(cake_deepgemm_mega_gate): 16-way split-K cluster reduction with a compensated token-parallel combine on the small-M routing-gate routes (SM100a, SM103a) (#6129) ## Summary Regenerates the fused routing-gate family `flashinfer.experimental.deepgemm_mega_gate` (public API `flashinfer.mega_gate.prepare_mega_gate`) ...
csrc/experimental/deepgemm_mega_gate/generated/cake_deepgemm_mega_gate_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- csrc/experimental/deepgemm_mega_gate/generated/cake_deepgemm_mega_gate_device_common.cuh +++ csrc/experimental/deepgemm_mega_gate/generated/cake_deepgemm_mega_gate_device_common.cuh @@ -19,7 +19,7 @@ // Generated by cake.codegen — do not edit. // Shared device preamble of the sm_100a, sm_103a generated kernels:...
48
48
2
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "1.05x", "0.9957x", "1.0000x", "1.0037x", "1.0032x", "1.0083x", "1.0001x", "1.0019x", "0.9987x", "0.9975x" ]
Optimize this cuda kernel file from flashinfer (csrc/experimental/deepgemm_mega_gate/generated/cake_deepgemm_mega_gate_device_common.cuh). Goal: perf(cake_deepgemm_mega_gate): 16-way split-K cluster reduction with a compensated token-parallel combine on the small-M routing-gate routes (SM100a, SM103a) Target hardware:...
## Summary Regenerates the fused routing-gate family `flashinfer.experimental.deepgemm_mega_gate` (public API `flashinfer.mega_gate.prepare_mega_gate`) for SM100a (B200) and SM103a (GB300) at FlashInfer `d4a3ad6c1`. Two scheduling changes on the single-tile small-M routes, everything else keeps its program: - The M =...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=5120,E=384,top-6,sqrtsoftplus,FP32 bias", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 8.896, "optimized": 7.36, "stated_speedup": null, "speedup": 1.2087}, {"scope": "kernel", "hardware": "B200", "model": ...
1.1274
null
flashinfer
26fe42d91acc1d56bd27560f64e9bf727d623cca
2026-10-06T15:07:53-07:00
6,146
https://github.com/flashinfer-ai/flashinfer/pull/6146
perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 7 (FP8 token ring on the M=256 cluster split-K cell, parallel-issue DSM partial exchange), shared-source export (SM100a, SM103a) (#6146)
perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 7 (FP8 token ring on the M=256 cluster split-K cell, parallel-issue DSM partial exchange), shared-source export (SM100a, SM103a) (#6146) Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of me...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,7 @@ // Generated by cake.codegen — do not e...
101
101
4
[ "kimi" ]
[ "B200", "B300", "GB300", "SM100", "SM103" ]
[ "1.022x", "1.014x", "2.04x", "2.03x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 7 (FP8 token ring on the M=256 cluster split-K cell, parallel-issue DSM ...
Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwise (see Baselines). ## Summary Round 7 of the experimental generated-program backend for the serialized `FP8_PB_WO` ...
[{"scope": "e2e", "hardware": "B200", "model": "Kimi-K3-NVFP4", "shape": null, "batch_size": null, "metric": "performance ratio", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.022, "speedup": 1.022}, {"scope": "e2e", "hardware": "GB300", "model": "Kimi-K3-NVFP4", "shap...
null
2.022
flashinfer
a9d3d64fee145fa2be06e08063de7d6ca1c45095
2026-10-06T14:04:10-07:00
6,128
https://github.com/flashinfer-ai/flashinfer/pull/6128
perf(cake_moe_finalize_allreduce_fusion): poll the owner segment at world size 8 too (#6128)
perf(cake_moe_finalize_allreduce_fusion): poll the owner segment at world size 8 too (#6128) ## Summary Second performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103), on top of #6057. No API, workspace-ABI, bindi...
csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #if defined(__CUDACC_RTC__) typedef unsigned long long uint64_t;...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #if defined(__CUDACC_RTC__) typedef unsigned long long uint64_t;...
--- csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu +++ csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu @@ -43,6 +43,10 @@ #define SMEM_RMS_SLOTS_STRIDE 32 #define SMEM_TOTAL 256 #define THREADS 224 + +template <typename F, size_t... _i> __device__ __forceinline__ void poll_...
12
23
1
[]
[ "B200", "B300", "SM100", "SM103" ]
[ "2048 ×", "8 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu). Goal: perf(cake_moe_finalize_allreduce_fusion): poll the owner segment at world size 8 too Target hardware: B200, B300, SM100, SM103 Target models: unspecified Current file: ```cuda /* * Copyright (...
## Summary Second performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103), on top of #6057. No API, workspace-ABI, binding-table or numerics change: the same twelve kernels, the same workspace layout, and every out...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "tokens=1", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.097, "speedup": 1.097}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "tokens=2", "batch_s...
1.2068
null
flashinfer
e835a9742ce4c999b211211cd9c70c75d32b2df2
2026-10-06T02:43:25-07:00
6,105
https://github.com/flashinfer-ai/flashinfer/pull/6105
perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) (#6105)
perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) (#6105) ## cake_sampling round 10 -- exact levers to the hardware floor Follow-up of #5439, #5553, #5664, #5771, #5873, #5950, #6065 (rounds 3-9). Round 10 keeps the correctness...
csrc/cake_sampling/cake_sampling_binding.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_sampling/cake_sampling_binding.cuh +++ csrc/cake_sampling/cake_sampling_binding.cuh @@ -89,6 +89,10 @@ // the default / sample builds of a multi-CTA stream) constexpr int64_t kFlagCoarsePush = 256; // host-side build selection (pushed-coarse-sums form of ...
78
22
5
[]
[ "B200", "GB300", "H100", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "1000 x", "4.74x", "11.04x", "18.74x", "3.84x", "5.66x", "7.81x", "4.78x", "10.78x", "16.89x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) Target hardware: B200, GB300, H100, SM100, SM103, SM107, SM120, SM90 Target m...
## cake_sampling round 10 -- exact levers to the hardware floor Follow-up of #5439, #5553, #5664, #5771, #5873, #5950, #6065 (rounds 3-9). Round 10 keeps the correctness contract unchanged (exact top-k set and tie rule, eps-exact top-p cut, deterministic sampling per (input, seed, offset), fp32 keys, no reduced-precis...
[{"scope": "kernel", "hardware": "gb300", "model": null, "shape": "k=10", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 4.74, "speedup": 4.74}, {"scope": "kernel", "hardware": "gb300", "model": null, "shape": "k=10", "batch_size":...
5.33
null
flashinfer
e835a9742ce4c999b211211cd9c70c75d32b2df2
2026-10-06T02:43:25-07:00
6,105
https://github.com/flashinfer-ai/flashinfer/pull/6105
perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) (#6105)
perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) (#6105) ## cake_sampling round 10 -- exact levers to the hardware floor Follow-up of #5439, #5553, #5664, #5771, #5873, #5950, #6065 (rounds 3-9). Round 10 keeps the correctness...
csrc/cake_sampling/generated/cake_sampling_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_sampling/generated/cake_sampling_kernels.cu +++ csrc/cake_sampling/generated/cake_sampling_kernels.cu @@ -32,3 +32,6 @@ #include "cake_sampling_kernels_part8.cuh" #include "cake_sampling_kernels_part9.cuh" #include "cake_sampling_kernels_part10.cuh" +#include "cake_sampling_kernels_part11.cuh" +#includ...
3
0
5
[]
[ "B200", "GB300", "H100", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "1000 x", "4.74x", "11.04x", "18.74x", "3.84x", "5.66x", "7.81x", "4.78x", "10.78x", "16.89x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/generated/cake_sampling_kernels.cu). Goal: perf(cake_sampling): round 10 -- CTA-local select twins, integer-tested whole-CTA tail, R200 one-wave re-pick (SM90, SM100a, SM103a, SM107a) Target hardware: B200, GB300, H100, SM100, SM103, SM107, SM120, SM90...
## cake_sampling round 10 -- exact levers to the hardware floor Follow-up of #5439, #5553, #5664, #5771, #5873, #5950, #6065 (rounds 3-9). Round 10 keeps the correctness contract unchanged (exact top-k set and tie rule, eps-exact top-p cut, deterministic sampling per (input, seed, offset), fp32 keys, no reduced-precis...
[{"scope": "kernel", "hardware": "gb300", "model": null, "shape": "k=10", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 4.74, "speedup": 4.74}, {"scope": "kernel", "hardware": "gb300", "model": null, "shape": "k=10", "batch_size":...
5.33
null
flashinfer
67b54628b821a65f67f8fa16685852e48ba32913
2026-10-06T01:09:09-07:00
5,672
https://github.com/flashinfer-ai/flashinfer/pull/5672
perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 6 (L2 prefetch, weight multicast, TMA-store epilogue, cluster split-K, 192-wide / stream-K GEMM, PDL), shared-source export (SM100a, SM103a) (#5672)
perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 6 (L2 prefetch, weight multicast, TMA-store epilogue, cluster split-K, 192-wide / stream-K GEMM, PDL), shared-source export (SM100a, SM103a) (#5672) Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at th...
flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
--- flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh +++ flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh @@ -16,7 +16,8 @@ // Generated by cake.codegen — do not e...
106
95
4
[ "kimi" ]
[ "B200", "B300", "GB300", "SM100", "SM103" ]
[ "2.040x", "1.030x", "2.026x", "1.040x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/kimi_k3_fp8_projection/csrc/cake_kimi_k3_fp8_projection/cake_kimi_k3_fp8_projection_device_common.cuh). Goal: perf(cake_fp8_projection): Kimi-K3 KDA/MLA projection GEMM round 6 (L2 prefetch, weight multicast, TMA-store epilogue, cluster split-K, 1...
Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwise. ## Summary Round 6 of the experimental generated-program backend for the serialized `FP8_PB_WO` KDA / MLA projec...
[{"scope": "e2e", "hardware": "B200", "model": "Kimi-K3-NVFP4", "shape": null, "batch_size": null, "metric": "performance", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 2.04, "speedup": 2.04}, {"scope": "e2e", "hardware": "B300", "model": "Kimi-K3-NVFP4", "shape": null,...
null
2.033
flashinfer
55edb4288eb5c82fbfb5f110d1329bd75d0b9849
2026-10-05T22:46:26-07:00
6,057
https://github.com/flashinfer-ai/flashinfer/pull/6057
perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid (#6057)
perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid (#6057) ## Summary Performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103). No API, workspace-AB...
csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_allreduce_fusion_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Host launcher for the Cake MoE finalize + all-reduce fusion kernels in // sm_100a/*_device.cu. One module per architecture links the twelve generated // kernels (dtype x world size x optional NVFP4 epilogue...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ // Host launcher for the Cake MoE finalize + all-reduce fusion kernels in // sm_100a/*_device.cu. One module per architecture links the twelve generated // kernels (dtype x world size x optional NVFP4 epilogue...
--- csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_allreduce_fusion_binding.cu +++ csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_allreduce_fusion_binding.cu @@ -13,6 +13,9 @@ #include <algorithm> #include <cstdint> +#include <map> +#include <mutex> +#include <utility> #include "tvm_ffi_uti...
33
4
2
[]
[ "B200", "B300", "SM100", "SM103" ]
[ "2048 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_allreduce_fusion_binding.cu). Goal: perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid Target hardware: B200, B300, SM100, SM103 Target models: uns...
## Summary Performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103). No API, workspace-ABI, binding-table or numerics change: every output stays bit-identical to the current kernel on the full test matrix (fp16/bf16...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "TP2", "batch_size": 128, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.673, "speedup": 1.673}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "TP4", "batch_size": 12...
1.27
null
flashinfer
55edb4288eb5c82fbfb5f110d1329bd75d0b9849
2026-10-05T22:46:26-07:00
6,057
https://github.com/flashinfer-ai/flashinfer/pull/6057
perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid (#6057)
perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid (#6057) ## Summary Performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103). No API, workspace-AB...
csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #if defined(__CUDACC_RTC__) typedef unsigned long long uint64_t;...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #if defined(__CUDACC_RTC__) typedef unsigned long long uint64_t;...
--- csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu +++ csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu @@ -38,6 +38,9 @@ #define SMEM_RMS_SCALAR_OFF 132 #define SMEM_RMS_SCALAR_STAGE_BYTES 4 #define SMEM_RMS_SCALAR_STRIDE 4 +#define SMEM_RMS_SLOTS_OFF 136 +#define SMEM_RMS_...
271
169
2
[]
[ "B200", "B300", "SM100", "SM103" ]
[ "2048 ×", "8 ×" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_moe_finalize_allreduce_fusion/cake_moe_finalize_kernels.cu). Goal: perf(cake_moe_finalize_allreduce_fusion): route-pair prefetch, DSM slot-ring RMSNorm reduction, occupancy-sized grid Target hardware: B200, B300, SM100, SM103 Target models: unspecified Current...
## Summary Performance round for `cake_moe_finalize_allreduce_fusion` (indexed MoE finalize + Lamport all-reduce + residual/RMSNorm + optional NVFP4 epilogue, SM100/SM103). No API, workspace-ABI, binding-table or numerics change: every output stays bit-identical to the current kernel on the full test matrix (fp16/bf16...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "TP2", "batch_size": 128, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.673, "speedup": 1.673}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "TP4", "batch_size": 12...
1.27
null
flashinfer
557721463e31a7e3cff42491b09b3b75f6ca9b92
2026-10-05T22:22:16-07:00
5,902
https://github.com/flashinfer-ai/flashinfer/pull/5902
perf(kda): one-wave dispatch and single-pass RMSNorm for multi-token KDA decode on SM10x (#5902)
perf(kda): one-wave dispatch and single-pass RMSNorm for multi-token KDA decode on SM10x (#5902) ## Description Avoid wave quantization in fused multi-token KDA decode and repeated RMSNorm reduction work on tiles that preserve its float32 addition grouping. ### Dispatch rule Select `(R, KQ, bpm, NCH, SPLIT) = (2, 1...
flashinfer/kda_kernels/fused_kda_decode_multitoken.py
cute_dsl
Apache-2.0
""" Copyright (c) 2026 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
""" Copyright (c) 2026 by FlashInfer team. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
--- flashinfer/kda_kernels/fused_kda_decode_multitoken.py +++ flashinfer/kda_kernels/fused_kda_decode_multitoken.py @@ -75,17 +75,18 @@ return (value + alignment - 1) // alignment * alignment -def _required_smem_bytes(T, R, KQ, NCH, SPLIT=1): +def _required_smem_bytes(T, R, KQ, NCH, SPLIT=1, norm_order=1): ...
82
27
1
[]
[ "B200", "B300", "CPU", "GB300", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/kda_kernels/fused_kda_decode_multitoken.py). Goal: perf(kda): one-wave dispatch and single-pass RMSNorm for multi-token KDA decode on SM10x Target hardware: B200, B300, CPU, GB300, SM107 Target models: unspecified Current file: ```python """ Copyright (c)...
## Description Avoid wave quantization in fused multi-token KDA decode and repeated RMSNorm reduction work on tiles that preserve its float32 addition grouping. ### Dispatch rule Select `(R, KQ, bpm, NCH, SPLIT) = (2, 16, 2, 2, 1)` by default on B200, B300, GB300, and SM107 for T in {5, 8} when the unsplit sequence-...
[{"scope": "kernel", "hardware": "SM107", "model": null, "shape": "96,5,3", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 21.31, "optimized": 18.05, "stated_speedup": null, "speedup": 1.1806}, {"scope": "kernel", "hardware": "SM107", "model": null, "shape": "96,5,4", "bat...
1.0281
null
flashinfer
9c6797eda4d208b4b56dcb30383b8772b112240b
2026-10-05T12:47:43-07:00
6,065
https://github.com/flashinfer-ai/flashinfer/pull/6065
perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix (#6065)
perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix (#6065) > Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwi...
csrc/cake_sampling/cake_sampling_binding.cuh
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_sampling/cake_sampling_binding.cuh +++ csrc/cake_sampling/cake_sampling_binding.cuh @@ -28,7 +28,7 @@ // (the slab row) CAKE_SAMPLING_STAGE1_TABLE(X) X(symbol, cluster, ept, stream, threads, // smem_bytes, fused_tail, // fused_block_tail, coarse_sample, spec_samp...
27
8
5
[ "qwen" ]
[ "B200", "GB300", "H100", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "8 x", "3.1x", "9.7x", "3.9x", "8.4x", "3.2x", "9.6x", "3.8x", "7.8x", "2.9x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix Target hardware: B200, GB300, H100, SM100, SM103, SM107, SM120, SM90 Target models: qwen Current file: ```cuda...
> Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwise. ## Cake radix sampling, round 9: leader-push exchange twins of the multi-CTA streams, graph-replay host fix Fo...
[{"scope": "kernel", "hardware": "R200", "model": null, "shape": "ept=32, two-to-five-chunk rows", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.01, "speedup": 1.01}, {"scope": "kernel", "hardware": "B200", "model": null, "shape...
1.0667
null
flashinfer
9c6797eda4d208b4b56dcb30383b8772b112240b
2026-10-05T12:47:43-07:00
6,065
https://github.com/flashinfer-ai/flashinfer/pull/6065
perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix (#6065)
perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix (#6065) > Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwi...
csrc/cake_sampling/generated/cake_sampling_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2026 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_sampling/generated/cake_sampling_kernels.cu +++ csrc/cake_sampling/generated/cake_sampling_kernels.cu @@ -30,3 +30,5 @@ #include "cake_sampling_kernels_part6.cuh" #include "cake_sampling_kernels_part7.cuh" #include "cake_sampling_kernels_part8.cuh" +#include "cake_sampling_kernels_part9.cuh" +#include ...
2
0
5
[ "qwen" ]
[ "B200", "GB300", "H100", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "8 x", "3.1x", "9.7x", "3.9x", "8.4x", "3.2x", "9.6x", "3.8x", "7.8x", "2.9x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/generated/cake_sampling_kernels.cu). Goal: perf(cake_sampling): round 9 -- leader-push exchange twins of the multi-CTA streams, graph-replay host fix Target hardware: B200, GB300, H100, SM100, SM103, SM107, SM120, SM90 Target models: qwen Current file...
> Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselines at the time of merge** on the **vast majority of performance benchmark shapes**, matching them otherwise. ## Cake radix sampling, round 9: leader-push exchange twins of the multi-CTA streams, graph-replay host fix Fo...
[{"scope": "kernel", "hardware": "R200", "model": null, "shape": "ept=32, two-to-five-chunk rows", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.01, "speedup": 1.01}, {"scope": "kernel", "hardware": "B200", "model": null, "shape...
1.0667
null
flashinfer
a1b9e13a4aa0093b0585a65d4808f6469b390555
2026-10-05T21:10:40+03:00
5,267
https://github.com/flashinfer-ai/flashinfer/pull/5267
perf(mamba): enable native SM107 stochastic rounding (#5267)
perf(mamba): enable native SM107 stochastic rounding (#5267) <!-- .github/pull_request_template.md --> ## 📌 Description Enable native stochastic rounding on Rubin (SM107a) for Mamba state updates. The existing architecture guard omitted SM107a, causing Rubin to use software conversion. This PR adds `__CUDA_ARCH_FEA...
include/flashinfer/mamba/conversion.cuh
cuda
Apache-2.0
#pragma once #include <cuda.h> #include <cuda_fp16.h> #include <cuda_fp8.h> #ifdef FLASHINFER_ENABLE_BF16 #include <cuda_bf16.h> #endif namespace flashinfer::mamba::conversion { inline __device__ float toFloat(float f) { return f; } inline __device__ float toFloat(__half h) { return __half2float(h); } #ifdef FLASHI...
#pragma once #include <cuda.h> #include <cuda_fp16.h> #include <cuda_fp8.h> #ifdef FLASHINFER_ENABLE_BF16 #include <cuda_bf16.h> #endif namespace flashinfer::mamba::conversion { inline __device__ float toFloat(float f) { return f; } inline __device__ float toFloat(__half h) { return __half2float(h); } #ifdef FLASHI...
--- include/flashinfer/mamba/conversion.cuh +++ include/flashinfer/mamba/conversion.cuh @@ -158,10 +158,10 @@ } // Hardware `cvt.rs.*` (stochastic-rounding convert) is available ONLY on the -// datacenter Blackwell "a" targets that actually carry the `.rs` PTX feature: -// sm_100a (B200) and sm_103a (B300). There ...
6
6
2
[ "mamba", "nemotron" ]
[ "SM100", "SM103", "SM107" ]
[ "1.413×", "1.547×", "1.573×" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/mamba/conversion.cuh). Goal: perf(mamba): enable native SM107 stochastic rounding Target hardware: SM100, SM103, SM107 Target models: mamba, nemotron Current file: ```cuda #pragma once #include <cuda.h> #include <cuda_fp16.h> #include <cuda_fp8.h> #if...
<!-- .github/pull_request_template.md --> ## 📌 Description Enable native stochastic rounding on Rubin (SM107a) for Mamba state updates. The existing architecture guard omitted SM107a, causing Rubin to use software conversion. This PR adds `__CUDA_ARCH_FEAT_SM107_ALL` to `FLASHINFER_MAMBA_HAS_CVT_RS`, adds compute ca...
[{"scope": "kernel", "hardware": null, "model": "Nemotron 3 Ultra TP1", "shape": "heads=256,head_dim=64,state_dim=128,groups=8,T=1", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 10.848, "optimized": 7.648, "stated_speedup": 1.413, "speedup": 1.4184}, {"scope": "kernel", "ha...
1.5473
null
flashinfer
911cb09d0981c38d15b775b7820e4a76c72fcfa0
2026-10-04T10:47:29-07:00
6,045
https://github.com/flashinfer-ai/flashinfer/pull/6045
perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) (#6045)
perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) (#6045) ## Summary Rounds 7-17 of the DSv4 sparse-MLA Cake backend (`backend="cake"`, SM100 + SM103) as one cumulative change on the #5920 layout (per-variant bindings taking their checks from `tvm_ffi_ut...
csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_binding.cu +++ csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_binding.cu @@ -15,35 +15,43 @@ */ // Generated by the Cake source exporter — do not edit. -// tvm-ffi direct-source launcher for Cake kernel 'kernel_cake_dsv4_697c8662eb01c8d6bd5...
29
21
7
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103", "SM120" ]
[ "4 x", "0.9578x", "0.9820x", "6 x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_binding.cu). Goal: perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) Target hardware: B200, CPU, GB300, SM100, SM103, SM120 Target models: deepseek ...
## Summary Rounds 7-17 of the DSv4 sparse-MLA Cake backend (`backend="cake"`, SM100 + SM103) as one cumulative change on the #5920 layout (per-variant bindings taking their checks from `tvm_ffi_utils.h`, shared sources under `common/`, `run_sequence`, the host's direct variant launches). Main carries round 6 (#5700) f...
[{"scope": "kernel", "hardware": "GB300", "model": null, "shape": null, "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 6.53, "optimized": 6.88, "stated_speedup": null, "speedup": 0.9491}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "batch_size": n...
1.022
null
flashinfer
911cb09d0981c38d15b775b7820e4a76c72fcfa0
2026-10-04T10:47:29-07:00
6,045
https://github.com/flashinfer-ai/flashinfer/pull/6045
perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) (#6045)
perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) (#6045) ## Summary Rounds 7-17 of the DSv4 sparse-MLA Cake backend (`backend="cake"`, SM100 + SM103) as one cumulative change on the #5920 layout (per-variant bindings taking their checks from `tvm_ffi_ut...
csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_kernel.cu
cuda
Apache-2.0
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
--- csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_kernel.cu +++ csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_kernel.cu @@ -26,12 +26,9 @@ static_assert(sizeof(uint64_t) == 8, "Cake requires an LP64 CUDA host ABI"); typedef signed int int32_t; typedef short int int16_t; -st...
9
21
7
[ "deepseek" ]
[ "B200", "CPU", "GB300", "SM100", "SM103", "SM120" ]
[ "4 x", "0.9578x", "0.9820x", "6 x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_dsv4/common/cake_dsv4_bf16_h64_compressed_reduce_kernel.cu). Goal: perf(cake_sparse_mla): rounds 7-17 DSv4 sparse-MLA Cake programs for SM100/SM103 on the #5920 layout (cumulative) Target hardware: B200, CPU, GB300, SM100, SM103, SM120 Target models: deepseek ...
## Summary Rounds 7-17 of the DSv4 sparse-MLA Cake backend (`backend="cake"`, SM100 + SM103) as one cumulative change on the #5920 layout (per-variant bindings taking their checks from `tvm_ffi_utils.h`, shared sources under `common/`, `run_sequence`, the host's direct variant launches). Main carries round 6 (#5700) f...
[{"scope": "kernel", "hardware": "GB300", "model": null, "shape": null, "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 6.53, "optimized": 6.88, "stated_speedup": null, "speedup": 0.9491}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "batch_size": n...
1.022
null