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
⌀
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_split_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_split_reduce_binding.cu +++ csrc/cake_dsv4/common/cake_dsv4_split_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_d50dd820272ad24f7027'. -#include "cake_dsv4_hos...
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_split_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 Current file:...
## 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_split_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_split_reduce_kernel.cu +++ csrc/cake_dsv4/common/cake_dsv4_split_reduce_kernel.cu @@ -26,7 +26,6 @@ static_assert(sizeof(uint64_t) == 8, "Cake requires an LP64 CUDA host ABI"); typedef signed int int32_t; typedef short int int16_t; -struct __align__(128) CakeTenso...
2
5
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_split_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 Current file: ...
## 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
eafe816df2fea3d40d03e61842d8f7a383992292
2026-10-03T14:03:36-07:00
5,709
https://github.com/flashinfer-ai/flashinfer/pull/5709
perf(mla): prefetch split partials in the CuTe DSL MLA decode reducer (#5709)
perf(mla): prefetch split partials in the CuTe DSL MLA decode reducer (#5709) ## 📌 Description The monolithic CuTe DSL MLA decode reducer (FP8 and FP16/BF16) walks the splits in a runtime loop with one dependent L2 load per split, so its cost grows with the split count (3.7 → 5.5 µs from 32 to 64 splits for 12 heads...
flashinfer/cute_dsl/attention/monolithic/mla_decode.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/cute_dsl/attention/monolithic/mla_decode.py +++ flashinfer/cute_dsl/attention/monolithic/mla_decode.py @@ -43,8 +43,7 @@ _CUDA_GRID_Y_MAX = 65_535 -_REDUCER_D_TILE_CANDIDATES = (1, 2, 4) -_STATIC_REDUCER_MAX_SPLITS = 32 +_STATIC_REDUCER_MAX_SPLITS = 48 def _validate_nonpersistent_grid_y( @@ -67...
20
29
4
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/attention/monolithic/mla_decode.py). Goal: perf(mla): prefetch split partials in the CuTe DSL MLA decode reducer Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer team. # # ...
## 📌 Description The monolithic CuTe DSL MLA decode reducer (FP8 and FP16/BF16) walks the splits in a runtime loop with one dependent L2 load per split, so its cost grows with the split count (3.7 → 5.5 µs from 32 to 64 splits for 12 heads × 8 query tokens on SM107) and splitting long KV further does not pay off. **...
[{"scope": "e2e", "hardware": "SM107", "model": null, "shape": "q_len=8,heads=12", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 9.11, "optimized": 8.03, "stated_speedup": null, "speedup": 1.1345}, {"scope": "e2e", "hardware": "SM107", "model": null, "shape": "q_len=8,heads=...
null
1.1432
flashinfer
b8a3c20827d5e5dfb35e79310eb20c90a91416d2
2026-10-02T23:03:44-07:00
6,005
https://github.com/flashinfer-ai/flashinfer/pull/6005
perf(cake kda): serve explicit T=1 cu_seqlens decode on the frozen Cake route and memoize schedule selection (#6005)
perf(cake kda): serve explicit T=1 cu_seqlens decode on the frozen Cake route and memoize schedule selection (#6005) <!-- .github/PULL_REQUEST_TEMPLATE.md --> ## 📌 Description Follow-up to #5760, which measured the frozen Cake schedule to be the faster one for explicit T=1 `cu_seqlens` decode and stopped `"auto"` f...
flashinfer/kda_kernels/recurrent_kda.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/kda_kernels/recurrent_kda.py +++ flashinfer/kda_kernels/recurrent_kda.py @@ -1295,10 +1295,12 @@ return begin, begin + (last_element + 1) * tensor.element_size() +def _byte_ranges_overlap(lhs: tuple[int, int], rhs: tuple[int, int]) -> bool: + return lhs[0] < rhs[1] and rhs[0] < lhs[1] + + de...
210
67
1
[]
[ "B200", "CPU" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/kda_kernels/recurrent_kda.py). Goal: perf(cake kda): serve explicit T=1 cu_seqlens decode on the frozen Cake route and memoize schedule selection Target hardware: B200, CPU Target models: unspecified Current file: ```python """ Copyright (c) 2025 by Flash...
<!-- .github/PULL_REQUEST_TEMPLATE.md --> ## 📌 Description Follow-up to #5760, which measured the frozen Cake schedule to be the faster one for explicit T=1 `cu_seqlens` decode and stopped `"auto"` from probing it only because selection was too expensive. This PR removes the two host-side costs that made that necess...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "H=16,K=128", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 111.5, "optimized": 34.0, "stated_speedup": null, "speedup": 3.2794}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "H=16,K=128", "b...
1.6643
null
flashinfer
4af32c083c1af82d0fef65d318c05b05b3bb8122
2026-10-02T16:14:23-07:00
5,760
https://github.com/flashinfer-ai/flashinfer/pull/5760
perf(kda): stop probing Cake for explicit T=1 cu_seqlens decode under "auto" (#5760)
perf(kda): stop probing Cake for explicit T=1 cu_seqlens decode under "auto" (#5760) <!-- .github/PULL_REQUEST_TEMPLATE.md --> ## 📌 Description `backend="cake"` refuses explicit T=1 `cu_seqlens` decode outright — it raises in `run_recurrent_kda` before the selector runs. `backend="auto"` did not. Because `auto_unbo...
flashinfer/kda_kernels/recurrent_kda.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/kda_kernels/recurrent_kda.py +++ flashinfer/kda_kernels/recurrent_kda.py @@ -2081,6 +2081,7 @@ auto_unbounded_softplus_candidate = ( backend == "auto" and num_spec_tokens is None + and cu_seqlens is None and H > 0 and HV == H and K == 128
1
0
1
[]
[ "B200" ]
[ "1.4x", "1.37x", "1.49x", "1.39x", "1.87x", "4.03x", "1.67x", "8.0x", "3.8x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/kda_kernels/recurrent_kda.py). Goal: perf(kda): stop probing Cake for explicit T=1 cu_seqlens decode under "auto" Target hardware: B200 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the Apach...
<!-- .github/PULL_REQUEST_TEMPLATE.md --> ## 📌 Description `backend="cake"` refuses explicit T=1 `cu_seqlens` decode outright — it raises in `run_recurrent_kda` before the selector runs. `backend="auto"` did not. Because `auto_unbounded_softplus_candidate` never tested `cu_seqlens`, `auto` probed the Cake selector o...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "H=16,K=128,V=128", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 88.06, "optimized": 24.54, "stated_speedup": null, "speedup": 3.5884}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "H=16,K=1...
2.4044
null
flashinfer
3dea41055e232fddca253ea814913d41b0e3727b
2026-10-02T13:22:53-07:00
5,950
https://github.com/flashinfer-ai/flashinfer/pull/5950
perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy (#5950)
perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy (#5950) ## Cake radix sampling, round 8: slab-tail twins of the sample builds and a pushed-coarse-sums twin of the cluster-8 default build Follow-up of #5439, #548...
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 @@ -27,7 +27,8 @@ // warps) CAKE_SAMPLING_FUSED_BLOCK_TAIL_KCAP largest top-k the whole-CTA stage-2/3 tail serves // (the slab row) CAKE_SAMPLING_STAGE1_TABLE(X) X(symbol, cluster, ept, stream, threads, // smem_b...
65
11
5
[ "qwen" ]
[ "B200", "GB300", "H100", "HOPPER", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "3.1x", "9.2x", "2.1x", "4.5x", "3.1x", "9.5x", "2.3x", "4.6x", "2.9x", "7.8x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy Target hardware: B200, GB300, H100, HOPPER, SM100, SM103, SM107...
> 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 8: slab-tail twins of the sample builds and a pushed-coarse-sums twin of the clus...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "k=10", "batch_size": 32, "metric": "time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.972, "stated_speedup": null, "speedup": 1.0288}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "k=10", "batch_size": 32,...
1.002
null
flashinfer
3dea41055e232fddca253ea814913d41b0e3727b
2026-10-02T13:22:53-07:00
5,950
https://github.com/flashinfer-ai/flashinfer/pull/5950
perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy (#5950)
perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy (#5950) ## Cake radix sampling, round 8: slab-tail twins of the sample builds and a pushed-coarse-sums twin of the cluster-8 default build Follow-up of #5439, #548...
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 @@ -28,3 +28,6 @@ #include "cake_sampling_kernels_part4.cuh" #include "cake_sampling_kernels_part5.cuh" #include "cake_sampling_kernels_part6.cuh" +#include "cake_sampling_kernels_part7.cuh" +#include ...
3
0
5
[ "qwen" ]
[ "B200", "GB300", "H100", "HOPPER", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "3.1x", "9.2x", "2.1x", "4.5x", "3.1x", "9.5x", "2.3x", "4.6x", "2.9x", "7.8x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/generated/cake_sampling_kernels.cu). Goal: perf(cake_sampling): round 8 -- slab-tail twins of the sample builds, pushed-coarse-sums twin of the cluster-8 default build, Hopper whole-CTA tail policy Target hardware: B200, GB300, H100, HOPPER, SM100, SM1...
> 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 8: slab-tail twins of the sample builds and a pushed-coarse-sums twin of the clus...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "k=10", "batch_size": 32, "metric": "time", "unit": null, "higher_is_better": false, "baseline": 1.0, "optimized": 0.972, "stated_speedup": null, "speedup": 1.0288}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "k=10", "batch_size": 32,...
1.002
null
flashinfer
b730d5f6f5929fe666b24b466144a57f5587ba4b
2026-10-01T22:59:19-07:00
5,319
https://github.com/flashinfer-ai/flashinfer/pull/5319
perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize (#5319)
perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize (#5319) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce the cost of deterministic CuTe DSL MoE finalize for W4A4 per-tensor/per-token NVFP4 activation scaling and W4A16 BF16 activations when `use_fused_finalize=False`. - **Reduct...
flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 FlashInfer contributors. # SPDX-License-Identifier: Apache-2.0 """SM100 NVFP4-weight, BF16-activation fused MoE launcher.""" from dataclasses import dataclass from typing import Dict, Optional, Tuple import cutlass import cutlass.cute as cute import torch from flashinfer.cute_dsl.utils import (...
# Copyright (c) 2026 FlashInfer contributors. # SPDX-License-Identifier: Apache-2.0 """SM100 NVFP4-weight, BF16-activation fused MoE launcher.""" from dataclasses import dataclass from typing import Dict, Optional, Tuple import cutlass import cutlass.cute as cute import torch from flashinfer.cute_dsl.utils import (...
--- flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py +++ flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py @@ -21,7 +21,6 @@ moe_output_memset_inplace, moe_permute, moe_sort, - moe_unpermute, normalize_cute_dsl_moe_activation_type, validate_cute_dsl_moe_situ_config, ) @@ -32,6 +31,7 ...
1
1
4
[ "deepseek" ]
[ "A10G", "B300", "BLACKWELL", "H100", "SM100", "SM103" ]
[ "1.1118×", "1.0745×", "1.0783×", "1.1396×", "1.0644×", "1.0519×", "1.0606×", "1.0414×", "1.0356×", "1.0432×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py). Goal: perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize Target hardware: A10G, B300, BLACKWELL, H100, SM100, SM103 Target models: deepseek Current file: ```python # Copyright (c) 2026 FlashInfer contributo...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce the cost of deterministic CuTe DSL MoE finalize for W4A4 per-tensor/per-token NVFP4 activation scaling and W4A16 BF16 activations when `use_fused_finalize=False`. - **Reduction:** replace the native standalone finalizer with a shared CuTe...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "W4A4 per-tensor", "batch_size": 1, "metric": "latency speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.1118, "speedup": 1.1118}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "W4...
1.0194
0.9832
flashinfer
b730d5f6f5929fe666b24b466144a57f5587ba4b
2026-10-01T22:59:19-07:00
5,319
https://github.com/flashinfer-ai/flashinfer/pull/5319
perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize (#5319)
perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize (#5319) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce the cost of deterministic CuTe DSL MoE finalize for W4A4 per-tensor/per-token NVFP4 activation scaling and W4A16 BF16 activations when `use_fused_finalize=False`. - **Reduct...
flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
--- flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py +++ flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py @@ -1429,6 +1429,13 @@ ) if cutlass.const_expr(self.enable_pdl): griddepcontrol_wait() + # Let the standalone finalizer prepare routin...
10
1
4
[ "deepseek" ]
[ "A10G", "B300", "BLACKWELL", "H100", "SM100", "SM103" ]
[ "1.1118×", "1.0745×", "1.0783×", "1.1396×", "1.0644×", "1.0519×", "1.0606×", "1.0414×", "1.0356×", "1.0432×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py). Goal: perf: optimize CuTe DSL W4A4 and W4A16 unfused finalize Target hardware: A10G, B300, BLACKWELL, H100, SM100, SM103 Target models: deepseek Current file: ```python # Copyright (c) 2025 - 2026 NVIDIA ...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce the cost of deterministic CuTe DSL MoE finalize for W4A4 per-tensor/per-token NVFP4 activation scaling and W4A16 BF16 activations when `use_fused_finalize=False`. - **Reduction:** replace the native standalone finalizer with a shared CuTe...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "W4A4 per-tensor", "batch_size": 1, "metric": "latency speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.1118, "speedup": 1.1118}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "W4...
1.0194
0.9832
flashinfer
9f58370546a51b09325d1485cfc359d9d35b4319
2026-10-01T18:12:09-07:00
4,941
https://github.com/flashinfer-ai/flashinfer/pull/4941
perf(gemm): cute-dsl bf16-nvfp4 dense gemm fix to include no-autotune fallback tactic (#4941)
perf(gemm): cute-dsl bf16-nvfp4 dense gemm fix to include no-autotune fallback tactic (#4941) ## 📌 Description Two fixes to the SM100/SM103 CuTe-DSL dense W4A16 (`mm_bf16_fp4`) path. Both affect only the no-autotune path; autotuned callers are untouched by change 2 and lose ~2.7% from change 1 (see below). ### 1. R...
flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py
cute_dsl
Apache-2.0
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """Architecture-specific CuTe-DSL backend for the BF16 x NVFP4 GEMM.""" import functools from typing import Dict, List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSpec...
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """Architecture-specific CuTe-DSL backend for the BF16 x NVFP4 GEMM.""" import functools from typing import Dict, List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSpec...
--- flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py +++ flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py @@ -639,6 +639,47 @@ _SM100_BF16_FP4_TACTICS = tuple(_sm100_bf16_fp4_tactic_configs()) +_SM100_BF16_FP4_TACTIC_ORDER = {t: i for i, t in enumerate(_SM100_BF16_FP4_TACTICS)} + +# Untuned pick, memoized on (m, n, k, sm_count)...
57
9
1
[]
[ "B200", "B300", "GB300", "SM100", "SM103" ]
[ "1.8x", "1.81x", "1.03x", "1.8x", "5.1x", "9.1x", "10.2x", "1.00x", "1.00x", "1.00x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py). Goal: perf(gemm): cute-dsl bf16-nvfp4 dense gemm fix to include no-autotune fallback tactic Target hardware: B200, B300, GB300, SM100, SM103 Target models: unspecified Current file: ```python # SPDX-FileCopyrightText: Copy...
## 📌 Description Two fixes to the SM100/SM103 CuTe-DSL dense W4A16 (`mm_bf16_fp4`) path. Both affect only the no-autotune path; autotuned callers are untouched by change 2 and lose ~2.7% from change 1 (see below). ### 1. Restore `--opt-level 2` (regression from #4686) #4686 dropped this path's explicit `--opt-level...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "m=256", "batch_size": 256, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.0952, "optimized": 0.0523, "stated_speedup": null, "speedup": 1.8203}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "m=1", "batch_si...
1.6726
5.185
flashinfer
1cad38165e5fe9d3007a07f79b3d5a2d73d6fce4
2026-10-01T04:34:16-07:00
5,847
https://github.com/flashinfer-ai/flashinfer/pull/5847
perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy (#5847)
perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy (#5847) ## cake_sampling round 7: speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy Follow-up to #5439, #5482, #5585, #5607, #5636, #568...
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 @@ -27,7 +27,7 @@ // warps) CAKE_SAMPLING_FUSED_BLOCK_TAIL_KCAP largest top-k the whole-CTA stage-2/3 tail serves // (the slab row) CAKE_SAMPLING_STAGE1_TABLE(X) X(symbol, cluster, ept, stream, threads, // smem_b...
30
9
7
[ "qwen" ]
[ "B200", "GB300", "H100", "HOPPER", "SM107", "SM120" ]
[ "1.81x", "3.52x", "8.89x", "1.81x", "4.07x", "8.71x", "1.53x", "4.22x", "15.93x", "1.59x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy Target hardware: B200, GB300, H100, HOPPER, SM107, SM120 Target models: qwen Current ...
> 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_sampling round 7: speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-key...
[{"scope": "kernel", "hardware": "H100 SXM", "model": null, "shape": "k = 1000, V = 262144, B = 1", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 34.1, "optimized": 30.9, "stated_speedup": null, "speedup": 1.1036}, {"scope": "kernel", "hardware": "H100 SXM", "model": null, "...
1.0195
2.1015
flashinfer
1cad38165e5fe9d3007a07f79b3d5a2d73d6fce4
2026-10-01T04:34:16-07:00
5,847
https://github.com/flashinfer-ai/flashinfer/pull/5847
perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy (#5847)
perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy (#5847) ## cake_sampling round 7: speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy Follow-up to #5439, #5482, #5585, #5607, #5636, #568...
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 @@ -25,3 +25,6 @@ #include "cake_sampling_kernels_part1.cuh" #include "cake_sampling_kernels_part2.cuh" #include "cake_sampling_kernels_part3.cuh" +#include "cake_sampling_kernels_part4.cuh" +#include ...
3
0
7
[ "qwen" ]
[ "B200", "GB300", "H100", "HOPPER", "SM107", "SM120" ]
[ "1.81x", "3.52x", "8.89x", "1.81x", "4.07x", "8.71x", "1.53x", "4.22x", "15.93x", "1.59x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/generated/cake_sampling_kernels.cu). Goal: perf(cake_sampling): round 7 -- speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-keyed host policy Target hardware: B200, GB300, H100, HOPPER, SM107, SM120 Target models: qwen ...
> 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_sampling round 7: speculative-sample stage-1 twin, whole-CTA tail for cluster-8 streams, capability-key...
[{"scope": "kernel", "hardware": "H100 SXM", "model": null, "shape": "k = 1000, V = 262144, B = 1", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 34.1, "optimized": 30.9, "stated_speedup": null, "speedup": 1.1036}, {"scope": "kernel", "hardware": "H100 SXM", "model": null, "...
1.0195
2.1015
flashinfer
192842b4952a4e86c6da427ccf9c0d917efb18c1
2026-09-30T19:00:32-07:00
5,750
https://github.com/flashinfer-ai/flashinfer/pull/5750
perf(cake_gqa): serve BF16/page-16 and E4M3/page-64 (head_dim 128/256) DCP speculative decode on SM100/SM103 with the on-device load-balanced programs (#5750)
perf(cake_gqa): serve BF16/page-16 and E4M3/page-64 (head_dim 128/256) DCP speculative decode on SM100/SM103 with the on-device load-balanced programs (#5750) ## Summary Round 3 of the on-device load-balanced varlen scheduler (sibling rounds: #5634 round 1, #5688 round 2) brings the scheduler to the Cake DCP speculat...
csrc/cake_fmha/include/cake_fmha.h
cpp
Apache-2.0
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <cuda_runtime_api.h> #include <cuda_bf16.h> #include <cuda_fp16.h> #include <stdint.h> #include "cake_fmha_hd256_support.h" struct __align__(128) CakeFmhaTensorMap { uint64_t opaque[16...
/* * Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <cuda_runtime_api.h> #include <cuda_bf16.h> #include <cuda_fp16.h> #include <stdint.h> #include "cake_fmha_hd256_support.h" struct __align__(128) CakeFmhaTensorMap { uint64_t opaque[16...
--- csrc/cake_fmha/include/cake_fmha.h +++ csrc/cake_fmha/include/cake_fmha.h @@ -341,6 +341,330 @@ cudaStream_t stream ); +extern "C" cudaError_t cake_fmha_launch_decode_balanced_bf16( + CakeFmhaTensorMap const* Qt, + CakeFmhaTensorMap const* K, + CakeFmhaTensorMap const* V, + __nv_bfloat16* O_ptr,...
407
0
6
[]
[ "B200", "BLACKWELL", "GB300", "SM100", "SM103", "SM107" ]
[ "64 x", "1.0x", "1.009x", "6.7x", "1.006x", "7.6x", "1.038x", "6.68x", "3.41x", "3.55x" ]
Optimize this cpp kernel file from flashinfer (csrc/cake_fmha/include/cake_fmha.h). Goal: perf(cake_gqa): serve BF16/page-16 and E4M3/page-64 (head_dim 128/256) DCP speculative decode on SM100/SM103 with the on-device load-balanced programs Target hardware: B200, BLACKWELL, GB300, SM100, SM103, SM107 Target models: un...
> 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 3 of the on-device load-balanced varlen scheduler (sibling rounds: #5634 round 1, #5688 round...
[{"scope": "e2e", "hardware": "GB300", "model": null, "shape": "BF16 cache, page 16, head_dim 128", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": null, "stated_speedup": 1.122, "speedup": 1.122}, {"scope": "e2e", "hardware": "GB300", "model": null, "shape...
2.0091
1.67
flashinfer
5ce4ef801f3606ff38779ca9f88a344779f21c82
2026-09-30T13:12:08-07:00
5,703
https://github.com/flashinfer-ai/flashinfer/pull/5703
perf(mla): deepen FP8 and FP16/BF16 decode load pipelines on SM107 (#5703)
perf(mla): deepen FP8 and FP16/BF16 decode load pipelines on SM107 (#5703) ## 📌 Description The monolithic CuTe DSL FP8 MLA decode kernel (the default path of `trtllm_batch_decode_with_kv_cache_mla(backend="cute-dsl")` for FP8 KV) keeps 3 K and 2 V load stages. That is about 224 KB of shared memory per CTA, right at...
flashinfer/cute_dsl/attention/monolithic/mla_decode.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/cute_dsl/attention/monolithic/mla_decode.py +++ flashinfer/cute_dsl/attention/monolithic/mla_decode.py @@ -28,13 +28,14 @@ import torch from cutlass import Float32, Int32 -from flashinfer.utils import device_support_pdl +from flashinfer.utils import device_support_pdl, get_compute_capability from ...
6
2
4
[]
[ "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/attention/monolithic/mla_decode.py). Goal: perf(mla): deepen FP8 and FP16/BF16 decode load pipelines on SM107 Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer team. # # Lic...
## 📌 Description The monolithic CuTe DSL FP8 MLA decode kernel (the default path of `trtllm_batch_decode_with_kv_cache_mla(backend="cute-dsl")` for FP8 KV) keeps 3 K and 2 V load stages. That is about 224 KB of shared memory per CTA, right at the default 227 KB limit. sm_107 allows 327 KB per CTA: CuTe DSL >= 4.8 li...
[{"scope": "e2e", "hardware": "SM107", "model": null, "shape": "H=12,Q=8", "batch_size": 16, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 298.11, "optimized": 283.08, "stated_speedup": null, "speedup": 1.0531}, {"scope": "e2e", "hardware": "SM107", "model": null, "shape": "H=12,Q=8", "batch...
null
1.0202
flashinfer
70bafa8014b3222f42732ba4fc68ed8b2fb594dd
2026-09-29T22:31:30-07:00
5,684
https://github.com/flashinfer-ai/flashinfer/pull/5684
perf(cake_sampling): round-5 kernels (software-pipelined sampled pass, ballot-gated filter, two-level cluster select, two-warp fused tail, ept-32 streams, per-architecture stage-2/3 forms) and chain-aware dispatch (#5684)
perf(cake_sampling): round-5 kernels (software-pipelined sampled pass, ballot-gated filter, two-level cluster select, two-warp fused tail, ept-32 streams, per-architecture stage-2/3 forms) and chain-aware dispatch (#5684) Developed by the **CAKE team**, the kernels in this PR **outperform** the relevant **SOTA baselin...
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 @@ -17,13 +17,18 @@ // TVM-FFI binding for the frozen radix top-k / sparse top-p sampling bundle. // // The JIT module (flashinfer/jit/cake_sampling.py) generates a small .cu that defines: -// CAKE_SAMPLING_BODY_FILE ...
73
26
4
[ "qwen" ]
[ "B200", "BLACKWELL", "GB300", "H100", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "512 x", "128 x", "1.73x", "3.44x", "9.09x", "1.02x", "1.15x", "1.75x", "1.02x", "1.09x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round-5 kernels (software-pipelined sampled pass, ballot-gated filter, two-level cluster select, two-warp fused tail, ept-32 streams, per-architecture stage-2/3 forms) and chain-aware dispatch Targ...
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 5 of the radix top-k -> sparse top-p -> sampling pipeline (`flashinfer.cake_sampling`): a new f...
[{"scope": "kernel", "hardware": "H100", "model": null, "shape": "V=256K,B=128", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": null, "optimized": null, "stated_speedup": 0.81, "speedup": 0.81}, {"scope": "kernel", "hardware": "H100", "model": null, "shape": "V=256K,B=128",...
0.915
1.0739
flashinfer
c3f7334d43072684c25456659551446f8a75120b
2026-09-29T19:34:14-04:00
3,542
https://github.com/flashinfer-ai/flashinfer/pull/3542
perf(moe_bgmv): coalesced 128-bit loads for expand kernel (1.8–3× at batch≥256) (#3542)
perf(moe_bgmv): coalesced 128-bit loads for expand kernel (1.8–3× at batch≥256) (#3542) ## 📌 Description Adds a faster, memory-coalesced kernel for the MoE BGMV expand op (`moe_bgmv_expand_sliced`), gated so it only runs where it's measured to win. The op is memory-bound (each `(token, expert)` pair reads a `feat_o...
csrc/bgmv_moe/moe_bgmv_impl.cuh
cuda
Apache-2.0
#pragma once /* * Multi-LoRA MoE BGMV CUDA Kernel Implementation. * * Two kernels: * 1. Shrink: y[slice, pair, rank] += x[token] @ lora_a[expert, lora_id] * - Compute-bound, uses async pipeline, RANK_TILE tiling, multi-pair blocking * 2. Expand: y[token, feat] += shrink_out[pair, rank] @ lora_b[expert, ...
#pragma once /* * Multi-LoRA MoE BGMV CUDA Kernel Implementation. * * Two kernels: * 1. Shrink: y[slice, pair, rank] += x[token] @ lora_a[expert, lora_id] * - Compute-bound, uses async pipeline, RANK_TILE tiling, multi-pair blocking * 2. Expand: y[token, feat] += shrink_out[pair, rank] @ lora_b[expert, ...
--- csrc/bgmv_moe/moe_bgmv_impl.cuh +++ csrc/bgmv_moe/moe_bgmv_impl.cuh @@ -474,6 +474,87 @@ } // ============================================================ +// MoE BGMV Expand Kernel: coalesced 128-bit W loads. +// +// Each thread loads a contiguous 128-bit (uint4 = 8xbf16) chunk of W per pass, so a warp reads +...
100
0
1
[]
[ "H200" ]
[ "3×", "4×", "1.0×", "4.09×", "0.98×", "1.03×", "2.05×", "1.07×", "1.98×", "3.71×" ]
Optimize this cuda kernel file from flashinfer (csrc/bgmv_moe/moe_bgmv_impl.cuh). Goal: perf(moe_bgmv): coalesced 128-bit loads for expand kernel (1.8–3× at batch≥256) Target hardware: H200 Target models: unspecified Current file: ```cuda #pragma once /* * Multi-LoRA MoE BGMV CUDA Kernel Implementation. * * Two k...
## 📌 Description Adds a faster, memory-coalesced kernel for the MoE BGMV expand op (`moe_bgmv_expand_sliced`), gated so it only runs where it's measured to win. The op is memory-bound (each `(token, expert)` pair reads a `feat_out × feat_in` LoRA-B slice). The new `moe_bgmv_expand_opt_kernel`: - Loads W in **128-bit...
[{"scope": "e2e", "hardware": "H200", "model": null, "shape": null, "batch_size": 16, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 0.98, "speedup": 0.98}, {"scope": "e2e", "hardware": "H200", "model": null, "shape": null, "batch_size": 16, "metric":...
null
1.98
flashinfer
4301247a6938b8f010ee44569c64b80a2cd967b6
2026-09-29T13:09:03-07:00
5,687
https://github.com/flashinfer-ai/flashinfer/pull/5687
perf(cake_vsa_sm90): queue-scheduled persistent stage for long uniform plans (#5687)
perf(cake_vsa_sm90): queue-scheduled persistent stage for long uniform plans (#5687) ## Summary Second persistent stage `attention_queue` for `backend="cake"` and `backend="cake_cute"` (`VariableBlockSparseAttentionWrapper`, SM90): every CTA runs its planned tile list except its last two tiles, which a global tile qu...
flashinfer/experimental/cake_vsa_sm90_cute/__init__.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/experimental/cake_vsa_sm90_cute/__init__.py +++ flashinfer/experimental/cake_vsa_sm90_cute/__init__.py @@ -59,6 +59,7 @@ STAGES = ( "attention", + "attention_queue", "small_k1", "small_k3", "small_k4",
1
0
3
[]
[ "H100", "SM90" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/experimental/cake_vsa_sm90_cute/__init__.py). Goal: perf(cake_vsa_sm90): queue-scheduled persistent stage for long uniform plans Target hardware: H100, SM90 Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer team. # # Li...
> 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. Developed by the **CAKE team**, the SM90 VSA kernels in this PR outperform the reported reference baseline on n...
[{"scope": "e2e", "hardware": "H100", "model": null, "shape": "long video rows (m \u2265 32k)", "batch_size": null, "metric": "geomean performance", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": 1.0045, "stated_speedup": null, "speedup": 1.0045}, {"scope": "e2e", "hardware": "H100", "model": nul...
null
1.0005
flashinfer
99c158c60469df0396cd9f982a093dfbb9fdcec2
2026-09-29T10:13:19-07:00
5,329
https://github.com/flashinfer-ai/flashinfer/pull/5329
perf: specialize persistent BatchAttention for equal KV strides (#5329)
perf: specialize persistent BatchAttention for equal KV strides (#5329) <!-- .github/pull_request_template.md --> ## 📌 Description Persistent BatchAttention computes separate K/V offsets even when their strides match. Add an equal-stride specialization that shares offset calculation and prefetch while preserving se...
csrc/batch_attention.cu
cuda
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 ...
/* * 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 ...
--- csrc/batch_attention.cu +++ csrc/batch_attention.cu @@ -27,7 +27,7 @@ using tvm::ffi::Optional; template <uint32_t CTA_TILE_Q_1, uint32_t CTA_TILE_Q_2, uint32_t HEAD_DIM_QK, uint32_t HEAD_DIM_VO, - MaskMode MASK_MODE, typename AttentionVariant, typename Params> + MaskMode MASK_MODE, bool EQUAL...
30
3
8
[]
[ "B200", "H100", "SM100", "SM90" ]
[ "1.0456x", "1.0207x", "1.0707x" ]
Optimize this cuda kernel file from flashinfer (csrc/batch_attention.cu). Goal: perf: specialize persistent BatchAttention for equal KV strides Target hardware: B200, H100, SM100, SM90 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed under the Apache License...
<!-- .github/pull_request_template.md --> ## 📌 Description Persistent BatchAttention computes separate K/V offsets even when their strides match. Add an equal-stride specialization that shares offset calculation and prefetch while preserving separate K/V pointers and independent NVFP4 scale addressing. The wrapper ...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "NHD, page=16, hq=32, hk=8, dim=128, causal", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 23.936, "optimized": 23.872, "stated_speedup": null, "speedup": 1.0027}, {"scope": "kernel", "hardware": "H100", "mode...
1.0249
1.0157
flashinfer
99c158c60469df0396cd9f982a093dfbb9fdcec2
2026-09-29T10:13:19-07:00
5,329
https://github.com/flashinfer-ai/flashinfer/pull/5329
perf: specialize persistent BatchAttention for equal KV strides (#5329)
perf: specialize persistent BatchAttention for equal KV strides (#5329) <!-- .github/pull_request_template.md --> ## 📌 Description Persistent BatchAttention computes separate K/V offsets even when their strides match. Add an equal-stride specialization that shares offset calculation and prefetch while preserving se...
include/flashinfer/attention/persistent.cuh
cuda
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 ...
/* * 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 ...
--- include/flashinfer/attention/persistent.cuh +++ include/flashinfer/attention/persistent.cuh @@ -175,7 +175,7 @@ } } -template <typename KTraits_, typename Params_> +template <typename KTraits_, typename Params_, bool EQUAL_KV_STRIDES> struct BlockBatchPagedAttentionPersistent { using KTraits = KTraits_; ...
22
15
8
[]
[ "B200", "H100", "SM100", "SM90" ]
[ "1.0456x", "1.0207x", "1.0707x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/attention/persistent.cuh). Goal: perf: specialize persistent BatchAttention for equal KV strides Target hardware: B200, H100, SM100, SM90 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed unde...
<!-- .github/pull_request_template.md --> ## 📌 Description Persistent BatchAttention computes separate K/V offsets even when their strides match. Add an equal-stride specialization that shares offset calculation and prefetch while preserving separate K/V pointers and independent NVFP4 scale addressing. The wrapper ...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "NHD, page=16, hq=32, hk=8, dim=128, causal", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 23.936, "optimized": 23.872, "stated_speedup": null, "speedup": 1.0027}, {"scope": "kernel", "hardware": "H100", "mode...
1.0249
1.0157
flashinfer
43218730b7c957966ecca091cd800ba373171dc1
2026-09-29T02:55:14-07:00
5,674
https://github.com/flashinfer-ai/flashinfer/pull/5674
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674)
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674) ## Summary Round 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the ratio-8 freeze of #5658) and a new `pair` kernel family, the same tcgen05/TMEM schedule run as t...
flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_contiguous_tmem_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
--- flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_contiguous_tmem_binding.cu +++ flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_contiguous_tmem_binding.cu @@ -149,10 +149,119 @@ } } } - // 3D TMA descriptor for buffer 'Q' — compiled from the // des...
211
8
6
[]
[ "SM110" ]
[ "1.069x", "1.043x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_contiguous_tmem_binding.cu). Goal: perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA Target hardware: SM110 Target models: unspecified Curre...
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 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the r...
[{"scope": "kernel", "hardware": "Thor", "model": null, "shape": "batch=1,q_len=20,q_heads=32,kv_heads=4,head_dim=512,capacity=256,causal", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.049, "note": "FP8 page128 vs previous tmem ke...
1.0485
null
flashinfer
43218730b7c957966ecca091cd800ba373171dc1
2026-09-29T02:55:14-07:00
5,674
https://github.com/flashinfer-ai/flashinfer/pull/5674
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674)
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674) ## Summary Round 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the ratio-8 freeze of #5658) and a new `pair` kernel family, the same tcgen05/TMEM schedule run as t...
flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_paged_tmem_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
--- flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_paged_tmem_binding.cu +++ flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_paged_tmem_binding.cu @@ -149,10 +149,119 @@ } } } - // 3D TMA descriptor for buffer 'Q' — compiled from the // descriptor's ...
211
8
6
[]
[ "SM110" ]
[ "1.069x", "1.043x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp16_paged_tmem_binding.cu). Goal: perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA Target hardware: SM110 Target models: unspecified Current fi...
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 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the r...
[{"scope": "kernel", "hardware": "Thor", "model": null, "shape": "batch=1,q_len=20,q_heads=32,kv_heads=4,head_dim=512,capacity=256,causal", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.049, "note": "FP8 page128 vs previous tmem ke...
1.0485
null
flashinfer
43218730b7c957966ecca091cd800ba373171dc1
2026-09-29T02:55:14-07:00
5,674
https://github.com/flashinfer-ai/flashinfer/pull/5674
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674)
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674) ## Summary Round 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the ratio-8 freeze of #5658) and a new `pair` kernel family, the same tcgen05/TMEM schedule run as t...
flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_contiguous_tmem_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
--- flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_contiguous_tmem_binding.cu +++ flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_contiguous_tmem_binding.cu @@ -149,10 +149,119 @@ } } } - // 3D TMA descriptor for buffer 'Q' — compiled from the // descr...
211
8
6
[]
[ "SM110" ]
[ "1.069x", "1.043x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_contiguous_tmem_binding.cu). Goal: perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA Target hardware: SM110 Target models: unspecified Curren...
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 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the r...
[{"scope": "kernel", "hardware": "Thor", "model": null, "shape": "batch=1,q_len=20,q_heads=32,kv_heads=4,head_dim=512,capacity=256,causal", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.049, "note": "FP8 page128 vs previous tmem ke...
1.0485
null
flashinfer
43218730b7c957966ecca091cd800ba373171dc1
2026-09-29T02:55:14-07:00
5,674
https://github.com/flashinfer-ai/flashinfer/pull/5674
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674)
perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA (#5674) ## Summary Round 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the ratio-8 freeze of #5658) and a new `pair` kernel family, the same tcgen05/TMEM schedule run as t...
flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_paged_tmem_binding.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
/* * Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: Apache-2.0 */ #include <cuda.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cmath> #include <initializer_list> #include <limits> #include "tvm_ffi_utils.h" namespace { using OptionalTensor = tvm::f...
--- flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_paged_tmem_binding.cu +++ flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_paged_tmem_binding.cu @@ -149,10 +149,119 @@ } } } - // 3D TMA descriptor for buffer 'Q' — compiled from the // descriptor's st...
211
8
6
[]
[ "SM110" ]
[ "1.069x", "1.043x" ]
Optimize this cuda kernel file from flashinfer (flashinfer/experimental/sm110_xqa/csrc/sm110_xqa/sm_110a/sm110_xqa_tree_fp8_paged_tmem_binding.cu). Goal: perf(cake_xqa): per-GQA-ratio tmem kernels and the cta_group::2 pair routes for experimental SM110 XQA Target hardware: SM110 Target models: unspecified Current fil...
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 9 of the SM110 XQA D512 tree kernels: per-GQA-ratio traces for the `tmem` routes (lifting the r...
[{"scope": "kernel", "hardware": "Thor", "model": null, "shape": "batch=1,q_len=20,q_heads=32,kv_heads=4,head_dim=512,capacity=256,causal", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.049, "note": "FP8 page128 vs previous tmem ke...
1.0485
null
flashinfer
436526608e05eda8925091a078cf8616382bf51e
2026-09-28T17:47:59-07:00
5,636
https://github.com/flashinfer-ai/flashinfer/pull/5636
perf(cake_sampling): round-4 kernels (streaming candidate-list stage 1, fused small-k tail, host-decided PDL trigger) and k-aware dispatch (#5636)
perf(cake_sampling): round-4 kernels (streaming candidate-list stage 1, fused small-k tail, host-decided PDL trigger) and k-aware dispatch (#5636) 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 s...
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 @@ -21,6 +21,7 @@ // CAKE_SAMPLING_MIN_MAJOR / CAKE_SAMPLING_MIN_MINOR oldest compute capability the frozen body // supports (manifest min_compute_capability) // ...
119
9
4
[]
[ "B200", "BLACKWELL", "GB300", "H100", "HOPPER", "SM100", "SM103", "SM107", "SM120", "SM90" ]
[ "2.5x", "128 x", "1.65x", "3.04x", "7.50x", "0.98x", "1.11x", "1.56x", "0.98x", "1.15x" ]
Optimize this cuda kernel file from flashinfer (csrc/cake_sampling/cake_sampling_binding.cuh). Goal: perf(cake_sampling): round-4 kernels (streaming candidate-list stage 1, fused small-k tail, host-decided PDL trigger) and k-aware dispatch Target hardware: B200, BLACKWELL, GB300, H100, HOPPER, SM100, SM103, SM107, SM1...
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 4 of the radix top-k -> sparse top-p -> sampling pipeline (`flashinfer.cake_sampling`): a new f...
[{"scope": "kernel", "hardware": "R200", "model": null, "shape": "B=128,V=256K", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 58.6, "optimized": 56.0, "stated_speedup": null, "speedup": 1.0464}, {"scope": "kernel", "hardware": "H100", "model": null, "shape": "V=151936,B=1...
1.1082
1.0233
flashinfer
97b3bd80f0b9869b591a6732d871e6d09549388c
2026-09-27T12:17:08-07:00
5,609
https://github.com/flashinfer-ai/flashinfer/pull/5609
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609)
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609) <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_fp4` + `out_scale` fold in per-token `nvfp4_quantiz...
flashinfer/gemm/gemm_mm_fp4_cute_dsl.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/gemm/gemm_mm_fp4_cute_dsl.py +++ flashinfer/gemm/gemm_mm_fp4_cute_dsl.py @@ -139,6 +139,7 @@ enable_pdl, out_dtype, per_token_alpha, + l2_policy, ) = cache_key # On SM107 the use_tma_store slot is repurposed to carry the Rubin kernel # shape (inst_m, inst_...
61
4
5
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "7168x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/gemm_mm_fp4_cute_dsl.py). Goal: perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) Target hardware: B200, GB300, SM100, SM103 Target models: unspecified ...
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. <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_f...
[]
null
null
flashinfer
97b3bd80f0b9869b591a6732d871e6d09549388c
2026-09-27T12:17:08-07:00
5,609
https://github.com/flashinfer-ai/flashinfer/pull/5609
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609)
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609) <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_fp4` + `out_scale` fold in per-token `nvfp4_quantiz...
flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
--- flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py +++ flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py @@ -38,13 +38,85 @@ import cutlass.pipeline as pipeline import cutlass.utils as utils import cutlass.utils.blackwell_helpers as sm100_utils +from cutlass._mlir.dialects import llvm +from cutlass.cu...
207
21
5
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "7168x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py). Goal: perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) Target hardware: B200, GB300, SM100, SM103 Target model...
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. <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_f...
[]
null
null
flashinfer
97b3bd80f0b9869b591a6732d871e6d09549388c
2026-09-27T12:17:08-07:00
5,609
https://github.com/flashinfer-ai/flashinfer/pull/5609
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609)
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609) <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_fp4` + `out_scale` fold in per-token `nvfp4_quantiz...
flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100_splitk.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
--- flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100_splitk.py +++ flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100_splitk.py @@ -44,6 +44,7 @@ from cutlass.pipeline import PipelineTmaUmma, PipelineUmmaAsync from cutlass import Float32, Int32 from cutlass._mlir.dialects import llvm +from .dense_blockscaled_g...
174
7
5
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "7168x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100_splitk.py). Goal: perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) Target hardware: B200, GB300, SM100, SM103 Targe...
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. <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_f...
[]
null
null
flashinfer
97b3bd80f0b9869b591a6732d871e6d09549388c
2026-09-27T12:17:08-07:00
5,609
https://github.com/flashinfer-ai/flashinfer/pull/5609
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609)
perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) (#5609) <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_fp4` + `out_scale` fold in per-token `nvfp4_quantiz...
flashinfer/quantization/kernels/nvfp4_quantize.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/quantization/kernels/nvfp4_quantize.py +++ flashinfer/quantization/kernels/nvfp4_quantize.py @@ -77,6 +77,8 @@ bfloat2x8_to_e2m1x16_packed, process_nvfp4_block_half, process_nvfp4_block_bfloat, + _quantize_nvfp4_from_h2x8_bfloat, + _quantize_nvfp4_from_h2x8_half, process_nvfp4_b...
217
13
5
[]
[ "B200", "GB300", "SM100", "SM103" ]
[ "7168x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/quantization/kernels/nvfp4_quantize.py). Goal: perf(cake_mm_fp4): faster NVFP4 per-token path (register-resident per-token quantize, per-tile alpha epilogue, low-M split-K, L2 eviction policies) Target hardware: B200, GB300, SM100, SM103 Target models: uns...
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. <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #5504 (per-token alpha for NVFP4 `mm_f...
[]
null
null
flashinfer
316a70578a90749113ab375e9fa88b323034f9a0
2026-09-26T14:00:47-07:00
5,574
https://github.com/flashinfer-ai/flashinfer/pull/5574
perf(cake_warp_decode): route the SM103 Qwen3-30B-A3B num_tokens=8 warp-decode row onto the fused route-pack K256 path (#5574)
perf(cake_warp_decode): route the SM103 Qwen3-30B-A3B num_tokens=8 warp-decode row onto the fused route-pack K256 path (#5574) ## NVFP4 warp-decode: sm_103a Qwen3-30B-A3B num_tokens 8 joins the fused route-pack rows Policy-only update of the public-model NVFP4 warp-decode portfolio (SM100 / SM103, num_tokens 1–32). O...
csrc/fused_moe/warp_decode/cake_warp_decode_contract.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/fused_moe/warp_decode/cake_warp_decode_contract.cuh +++ csrc/fused_moe/warp_decode/cake_warp_decode_contract.cuh @@ -139,11 +139,11 @@ } // Rows whose route packing runs inside the FC1 prologue (RoutePacker::kFusedFc1). -// Only the Qwen3-30B geometry participates: sm_103a T9..T32 and sm_100a T10..T32 -// ...
20
7
2
[ "qwen" ]
[ "B300", "SM100", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/fused_moe/warp_decode/cake_warp_decode_contract.cuh). Goal: perf(cake_warp_decode): route the SM103 Qwen3-30B-A3B num_tokens=8 warp-decode row onto the fused route-pack K256 path Target hardware: B300, SM100, SM103 Target models: qwen Current file: ```cuda /* * Co...
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. ## NVFP4 warp-decode: sm_103a Qwen3-30B-A3B num_tokens 8 joins the fused route-pack rows Policy-only update of t...
[]
null
null
flashinfer
ea728cb558c32a3c58ec8fbd5a154ff676b9ab70
2026-09-23T16:49:21-07:00
5,431
https://github.com/flashinfer-ai/flashinfer/pull/5431
perf(cake_megamoe_topk_reduce): regenerate the SM100a reducer from the current Cake exporter (#5431)
perf(cake_megamoe_topk_reduce): regenerate the SM100a reducer from the current Cake exporter (#5431) ## 📌 Description Regenerate `csrc/cake_megamoe_topk_reduce/cake_megamoe_topk_reduce_kernels.cu` and its `manifest.json` from the current Cake exporter so the public bytes are reproducible with the exporter's `--check...
csrc/cake_megamoe_topk_reduce/cake_megamoe_topk_reduce_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2026 by FlashInfer team. * 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; #else typedef unsigne...
/* * Copyright (c) 2026 by FlashInfer team. * 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; #else typedef unsigne...
--- csrc/cake_megamoe_topk_reduce/cake_megamoe_topk_reduce_kernels.cu +++ csrc/cake_megamoe_topk_reduce/cake_megamoe_topk_reduce_kernels.cu @@ -40,10 +40,6 @@ return result; } -#define CAKE_INF CUDART_INF_F -#define NUM_MAIN_STAGES 1 -#define THREADS 256 - #include <math_constants.h> __device__ __forceinlin...
114
109
2
[]
[ "B200", "CPU", "SM100" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/cake_megamoe_topk_reduce/cake_megamoe_topk_reduce_kernels.cu). Goal: perf(cake_megamoe_topk_reduce): regenerate the SM100a reducer from the current Cake exporter Target hardware: B200, CPU, SM100 Target models: unspecified Current file: ```cuda /* * Copyright (c) ...
> 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. This PR refreshes the generated-source packaging for the **CAKE team's** existing MegaMoE reducer; the kernel b...
[]
null
null
flashinfer
87f80a75557b8ff4db77288e39ed40b6aecb9684
2026-09-23T00:16:13+08:00
5,125
https://github.com/flashinfer-ai/flashinfer/pull/5125
fix(cute-dsl): use has_side_effects to prevent wrong llvm optimisation (#5125)
fix(cute-dsl): use has_side_effects to prevent wrong llvm optimisation (#5125) PLEASE ANALYSE THE ATTACHED ZIP FILES, WHICH IS SELF-CONTAINED. (You can ask an agent to do it.) [flashinfer-inline-asm-evidence.zip](https://github.com/user-attachments/files/32085057/flashinfer-inline-asm-evidence.zip) # [CuTeDSL] Sha...
flashinfer/cute_dsl/fp4_common.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/fp4_common.py +++ flashinfer/cute_dsl/fp4_common.py @@ -318,7 +318,7 @@ [Int32(smem_addr).ir_value(loc=loc, ip=ip)], "ld.shared.v2.u32 {$0, $1}, [$2];", "=r,=r,r", - has_side_effects=False, + has_side_effects=True, is_align_stack=False, ...
2
2
1
[]
[ "B200", "SM80" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/fp4_common.py). Goal: fix(cute-dsl): use has_side_effects to prevent wrong llvm optimisation Target hardware: B200, SM80 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the Apache Lice...
PLEASE ANALYSE THE ATTACHED ZIP FILES, WHICH IS SELF-CONTAINED. (You can ask an agent to do it.) [flashinfer-inline-asm-evidence.zip](https://github.com/user-attachments/files/32085057/flashinfer-inline-asm-evidence.zip) # [CuTeDSL] Shared-load inline-asm helpers omit effects, allowing stale-load reuse `ld_shared_v...
[]
null
null
flashinfer
dc04f50c9aa3eabcdaa5feb0934edb3d85e9529a
2026-09-18T18:31:07-07:00
5,288
https://github.com/flashinfer-ai/flashinfer/pull/5288
perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) (#5288)
perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) (#5288) <!-- .github/pull_request_template.md kept; sections filled --> ## 📌 Description Upstream sync of two kernel families FlashInfer vendors from NVIDIA sources, with every change measu...
flashinfer/topk_varlen/kernels/radix_topk.py
cute_dsl
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 by applic...
# 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 by applic...
--- flashinfer/topk_varlen/kernels/radix_topk.py +++ flashinfer/topk_varlen/kernels/radix_topk.py @@ -1163,6 +1163,11 @@ # next_n adjustment is in token units, so it must happen before # dividing by compress_ratio; when compress_ratio=1 this is a no-op. length = (seq_len - next_n ...
5
0
8
[]
[ "A100", "B200", "B300", "H100", "L40S", "RTX5080", "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/topk_varlen/kernels/radix_topk.py). Goal: perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) Target hardware: A100, B200, B300, H100, L40S, RTX5080, SM100, SM103, SM107 Target mod...
<!-- .github/pull_request_template.md kept; sections filled --> ## 📌 Description Upstream sync of two kernel families FlashInfer vendors from NVIDIA sources, with every change measured same-node against the current tree before adoption (and two upstream heuristics rejected on measurement). **1. Paged-MQA logits (`at...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=2048, n_rows<=1024", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1.1, "optimized": 0.85, "stated_speedup": null, "speedup": 1.2941}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "VPT>...
1.145
null
flashinfer
dc04f50c9aa3eabcdaa5feb0934edb3d85e9529a
2026-09-18T18:31:07-07:00
5,288
https://github.com/flashinfer-ai/flashinfer/pull/5288
perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) (#5288)
perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) (#5288) <!-- .github/pull_request_template.md kept; sections filled --> ## 📌 Description Upstream sync of two kernel families FlashInfer vendors from NVIDIA sources, with every change measu...
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 @@ -34,9 +34,9 @@ ladders; TRT-LLM PR #17821 port). Requires a datacentre Blackwell-class GPU (sm_100/103, or Rubin sm_107), nvidia-cutlass-dsl and fp32 logits; ``p...
67
42
8
[]
[ "A100", "B200", "B300", "H100", "L40S", "RTX5080", "SM100", "SM103", "SM107" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/topk_varlen/topk_varlen.py). Goal: perf(topk_varlen, attn_scores): upstream sync — gvr_2 hint-free engines (TRT-LLM #18410) + paged-MQA relu epilogue (DKG !27837) Target hardware: A100, B200, B300, H100, L40S, RTX5080, SM100, SM103, SM107 Target models: un...
<!-- .github/pull_request_template.md kept; sections filled --> ## 📌 Description Upstream sync of two kernel families FlashInfer vendors from NVIDIA sources, with every change measured same-node against the current tree before adoption (and two upstream heuristics rejected on measurement). **1. Paged-MQA logits (`at...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=2048, n_rows<=1024", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1.1, "optimized": 0.85, "stated_speedup": null, "speedup": 1.2941}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "VPT>...
1.145
null
flashinfer
d207165a34290f6464cd33a233e8fe067b0f4fee
2026-09-18T22:00:55+03:00
4,825
https://github.com/flashinfer-ai/flashinfer/pull/4825
perf(cute-dsl): skip inactive pages in windowed decode (#4825)
perf(cute-dsl): skip inactive pages in windowed decode (#4825) <!-- .github/pull_request_template.md --> ## 📌 Description Skip whole paged-KV pages that are entirely before a sliding-window decode request's earliest active key. The kernel advances the page-table origin and rebases the effective sequence length befo...
flashinfer/cute_dsl/attention/gqa_decode_paged.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause import math from typing import Literal, Type, cast from functools import partial import cuda.bindings.driver as cuda import cutlass import cutlass.cute as cute from cutlass.cute.nvgpu import tcgen05, Op...
# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause import math from typing import Literal, Type, cast from functools import partial import cuda.bindings.driver as cuda import cutlass import cutlass.cute as cute from cutlass.cute.nvgpu import tcgen05, Op...
--- flashinfer/cute_dsl/attention/gqa_decode_paged.py +++ flashinfer/cute_dsl/attention/gqa_decode_paged.py @@ -956,12 +956,28 @@ # Runtime control flow if cutlass.const_expr(is_varlen): seqlen = seqlen_smem[0] - page_count = cute.ceil_div(seqlen, page_size) table_...
20
4
1
[ "kimi" ]
[ "B300", "SM103" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/attention/gqa_decode_paged.py). Goal: perf(cute-dsl): skip inactive pages in windowed decode Target hardware: B300, SM103 Target models: kimi Current file: ```python # Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPD...
<!-- .github/pull_request_template.md --> ## 📌 Description Skip whole paged-KV pages that are entirely before a sliding-window decode request's earliest active key. The kernel advances the page-table origin and rebases the effective sequence length before constructing page and sequence tile counts; the existing mask...
[{"scope": "kernel", "hardware": "NVIDIA B300", "model": null, "shape": "Page=16,K=1024", "batch_size": 16, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 42.185, "optimized": 42.237, "stated_speedup": null, "speedup": 0.9988}, {"scope": "kernel", "hardware": "NVIDIA B300", "model": null, "sh...
3.6424
null
flashinfer
012542c8523b7e0034fb24a65f0599c6f60b56ff
2026-09-18T10:09:28-07:00
5,305
https://github.com/flashinfer-ai/flashinfer/pull/5305
perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 (#5305)
perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 (#5305) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Two tiling adjustments to the CuTe-DSL norm kernels on Blackwell and Rubin...
flashinfer/norm/kernels/fused_add_rmsnorm.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/norm/kernels/fused_add_rmsnorm.py +++ flashinfer/norm/kernels/fused_add_rmsnorm.py @@ -47,7 +47,7 @@ get_cutlass_dtype, ) -from .rmsnorm import RMSNormKernel +from .rmsnorm import _LATENCY_BOUND_SMS, RMSNormKernel # ============================================================================...
8
2
2
[]
[ "B200", "BLACKWELL", "SM100", "SM103", "SM107" ]
[ "1.00×", "1.41×", "1.70×", "1.09×", "1.75×", "2.13×", "1.18×", "1.93×", "2.10×", "1.35×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/norm/kernels/fused_add_rmsnorm.py). Goal: perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 Target hardware: B200, BLACKWELL, SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) ...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Two tiling adjustments to the CuTe-DSL norm kernels on Blackwell and Rubin (SM100, SM103, SM107), gated on an explicit architecture list (`_LATENCY_BOUND_SMS`) so all other ...
[{"scope": "kernel", "hardware": "SM107", "model": null, "shape": "heads=32,head_dim=64", "batch_size": 512, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.0, "speedup": 1.0}, {"scope": "kernel", "hardware": "SM107", "model": null, "shape": "heads=3...
1.135
null
flashinfer
012542c8523b7e0034fb24a65f0599c6f60b56ff
2026-09-18T10:09:28-07:00
5,305
https://github.com/flashinfer-ai/flashinfer/pull/5305
perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 (#5305)
perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 (#5305) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Two tiling adjustments to the CuTe-DSL norm kernels on Blackwell and Rubin...
flashinfer/norm/kernels/rmsnorm.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/norm/kernels/rmsnorm.py +++ flashinfer/norm/kernels/rmsnorm.py @@ -419,6 +419,11 @@ # ============================================================================= +# Architectures where the norm kernels are bound by bytes in flight per SM; +# the tiling adjustments below apply only to these. +_LATE...
30
4
2
[]
[ "B200", "BLACKWELL", "SM100", "SM103", "SM107" ]
[ "1.00×", "1.41×", "1.70×", "1.09×", "1.75×", "2.13×", "1.18×", "1.93×", "2.10×", "1.35×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/norm/kernels/rmsnorm.py). Goal: perf(norm): tune CuTe-DSL qk_rmsnorm and fused_add_rmsnorm_quant tiling for SM100/103/107 Target hardware: B200, BLACKWELL, SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by Fl...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Two tiling adjustments to the CuTe-DSL norm kernels on Blackwell and Rubin (SM100, SM103, SM107), gated on an explicit architecture list (`_LATENCY_BOUND_SMS`) so all other ...
[{"scope": "kernel", "hardware": "SM107", "model": null, "shape": "heads=32,head_dim=64", "batch_size": 512, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.0, "speedup": 1.0}, {"scope": "kernel", "hardware": "SM107", "model": null, "shape": "heads=3...
1.135
null
flashinfer
0ef005a2cdbd9cbcb70a818f66655205c8a7558e
2026-09-17T23:24:50-07:00
5,186
https://github.com/flashinfer-ai/flashinfer/pull/5186
perf: reduce split W4A16 routing and output overhead (#5186)
perf: reduce split W4A16 routing and output overhead (#5186) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce split CuTe DSL W4A16 routing and bounds overhead, and use complete output subtiles for ordinary scratch stores. - **Routing:** mark top-k `cutlass.Constexpr`, include it in the...
flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py
cute_dsl
Apache-2.0
# Copyright (c) 2026 FlashInfer contributors. # SPDX-License-Identifier: Apache-2.0 """SM100 NVFP4-weight, BF16-activation fused MoE launcher.""" from dataclasses import dataclass from typing import Dict, Optional, Tuple import cutlass import cutlass.cute as cute import torch from flashinfer.cute_dsl.utils import (...
# Copyright (c) 2026 FlashInfer contributors. # SPDX-License-Identifier: Apache-2.0 """SM100 NVFP4-weight, BF16-activation fused MoE launcher.""" from dataclasses import dataclass from typing import Dict, Optional, Tuple import cutlass import cutlass.cute as cute import torch from flashinfer.cute_dsl.utils import (...
--- flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py +++ flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py @@ -125,6 +125,8 @@ ): mma_tiler_m, route_tile, mma_tiler_k = mma_tiler_mnk use_2cta_instrs = mma_tiler_m == 256 + cta_tile_m = mma_tiler_m // (2 if use_2cta_instrs else 1) + m_cluster_alig...
5
1
2
[ "deepseek" ]
[ "B300", "BLACKWELL" ]
[ "1.0056×", "0.9983×", "1.0033×", "1.0005×", "1.0023×", "0.9977×", "1.0008×", "1.0040×", "1.0027×", "1.0011×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16.py). Goal: perf: reduce split W4A16 routing and output overhead Target hardware: B300, BLACKWELL Target models: deepseek Current file: ```python # Copyright (c) 2026 FlashInfer contributors. # SPDX-License-Identifier...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce split CuTe DSL W4A16 routing and bounds overhead, and use complete output subtiles for ordinary scratch stores. - **Routing:** mark top-k `cutlass.Constexpr`, include it in the private kernel cache key, and omit the runtime argument. This...
[{"scope": "e2e", "hardware": "B300", "model": "DeepSeek-like", "shape": "H7168,I2048", "batch_size": 8, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 70.912, "optimized": 70.752, "stated_speedup": null, "speedup": 1.0023}, {"scope": "e2e", "hardware": "B300", "model": "DeepSeek-like", "shap...
null
1.0047
flashinfer
0ef005a2cdbd9cbcb70a818f66655205c8a7558e
2026-09-17T23:24:50-07:00
5,186
https://github.com/flashinfer-ai/flashinfer/pull/5186
perf: reduce split W4A16 routing and output overhead (#5186)
perf: reduce split W4A16 routing and output overhead (#5186) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce split CuTe DSL W4A16 routing and bounds overhead, and use complete output subtiles for ordinary scratch stores. - **Routing:** mark top-k `cutlass.Constexpr`, include it in the...
flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
--- flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py +++ flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py @@ -96,6 +96,7 @@ use_clc_scheduler: bool, raster_along_m: bool, transform_fragment_size: int, + m_cluster_aligned: bool, ): """Initialize the W...
32
14
2
[ "deepseek" ]
[ "B300", "BLACKWELL" ]
[ "1.0056×", "0.9983×", "1.0033×", "1.0005×", "1.0023×", "0.9977×", "1.0008×", "1.0040×", "1.0027×", "1.0011×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py). Goal: perf: reduce split W4A16 routing and output overhead Target hardware: B300, BLACKWELL Target models: deepseek Current file: ```python # Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand Reduce split CuTe DSL W4A16 routing and bounds overhead, and use complete output subtiles for ordinary scratch stores. - **Routing:** mark top-k `cutlass.Constexpr`, include it in the private kernel cache key, and omit the runtime argument. This...
[{"scope": "e2e", "hardware": "B300", "model": "DeepSeek-like", "shape": "H7168,I2048", "batch_size": 8, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 70.912, "optimized": 70.752, "stated_speedup": null, "speedup": 1.0023}, {"scope": "e2e", "hardware": "B300", "model": "DeepSeek-like", "shap...
null
1.0047
flashinfer
bbf39c559d3f4b09482c014e710a3402a67fef88
2026-09-17T16:28:08-07:00
5,300
https://github.com/flashinfer-ai/flashinfer/pull/5300
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300)
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, ...
flashinfer/quantization/kernels/mxfp4_quantize.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/quantization/kernels/mxfp4_quantize.py +++ flashinfer/quantization/kernels/mxfp4_quantize.py @@ -805,6 +805,220 @@ # ============================================================================= +# ============================================================================= +# CuTe-DSL Kernel Class...
243
6
3
[]
[ "SM100", "SM103", "SM107" ]
[ "1.02x", "1.04x", "1.08x", "1.02x", "1.04x", "1.09x", "0.99x", "1.00x", "1.03x", "0.99x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/quantization/kernels/mxfp4_quantize.py). Goal: perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashIn...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, `mxfp8_quantize`) for SM107. Every change is gated on `get_compute_capability() == (10, 7)`; SM1...
[{"scope": "kernel", "hardware": "Rubin (SM107)", "model": null, "shape": "1024\u00d78192 to 8192\u00d724576", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.08, "config": "nvfp4 bf16", "tile": "128x4", "speedup": 1.08}, {"scope"...
1.03
null
flashinfer
bbf39c559d3f4b09482c014e710a3402a67fef88
2026-09-17T16:28:08-07:00
5,300
https://github.com/flashinfer-ai/flashinfer/pull/5300
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300)
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, ...
flashinfer/quantization/kernels/mxfp8_quantize.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/quantization/kernels/mxfp8_quantize.py +++ flashinfer/quantization/kernels/mxfp8_quantize.py @@ -96,6 +96,46 @@ SF_LAYOUT_LINEAR = 2 +# SM107 128x4 tile kernel (see MXFP8QuantizeTile128x4Kernel): 4-column groups +# per tile, threads per CTA, and persistent CTAs per SM. +_TILE128X4_COL_GROUPS = 1 +_T...
362
12
3
[]
[ "SM100", "SM103", "SM107" ]
[ "1.02x", "1.04x", "1.08x", "1.02x", "1.04x", "1.09x", "0.99x", "1.00x", "1.03x", "0.99x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/quantization/kernels/mxfp8_quantize.py). Goal: perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashIn...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, `mxfp8_quantize`) for SM107. Every change is gated on `get_compute_capability() == (10, 7)`; SM1...
[{"scope": "kernel", "hardware": "Rubin (SM107)", "model": null, "shape": "1024\u00d78192 to 8192\u00d724576", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.08, "config": "nvfp4 bf16", "tile": "128x4", "speedup": 1.08}, {"scope"...
1.03
null
flashinfer
bbf39c559d3f4b09482c014e710a3402a67fef88
2026-09-17T16:28:08-07:00
5,300
https://github.com/flashinfer-ai/flashinfer/pull/5300
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300)
perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 (#5300) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, ...
flashinfer/quantization/kernels/nvfp4_quantize.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/quantization/kernels/nvfp4_quantize.py +++ flashinfer/quantization/kernels/nvfp4_quantize.py @@ -31,6 +31,7 @@ """ import functools +import os from typing import Callable, Tuple, Union, cast import cutlass @@ -99,6 +100,18 @@ # Linear kernel: fixed 16 warps (512 threads), 1 SF block per thread ...
595
102
3
[]
[ "SM100", "SM103", "SM107" ]
[ "1.02x", "1.04x", "1.08x", "1.02x", "1.04x", "1.09x", "0.99x", "1.00x", "1.03x", "0.99x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/quantization/kernels/nvfp4_quantize.py). Goal: perf(quantization): SM107 dispatch tuning and 128x4 tile kernels for nvfp4/mxfp4/mxfp8 Target hardware: SM100, SM103, SM107 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashIn...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> Tunes the CuTe-DSL quantization kernels (`nvfp4_quantize`, `mxfp4_quantize`, `mxfp8_quantize`) for SM107. Every change is gated on `get_compute_capability() == (10, 7)`; SM1...
[{"scope": "kernel", "hardware": "Rubin (SM107)", "model": null, "shape": "1024\u00d78192 to 8192\u00d724576", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.08, "config": "nvfp4 bf16", "tile": "128x4", "speedup": 1.08}, {"scope"...
1.03
null
flashinfer
46afca6a173c239aa33a3a087ec181efcab237c7
2026-09-15T23:15:17-07:00
4,730
https://github.com/flashinfer-ai/flashinfer/pull/4730
feat(cake_comm): add optimized Blackwell MoE all-reduce fusion backend (#4730)
feat(cake_comm): add optimized Blackwell MoE all-reduce fusion backend (#4730) <!-- .github/pull_request_template.md --> ## 📌 Description This PR adds the opt-in `backend="cake"` implementation to `trtllm_moe_allreduce_fusion` on SM100 and SM103. It supports FP16/BF16, world sizes 2/4/8, eager and CUDA Graph execut...
csrc/trtllm_alltoall_prepare.cu
cuda
Apache-2.0
/* * 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 with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
/* * 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 with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
--- csrc/trtllm_alltoall_prepare.cu +++ csrc/trtllm_alltoall_prepare.cu @@ -198,6 +198,11 @@ __device__ __forceinline__ void recvCount(int* recvIndiceWorkspace, int* recvCounts, int* sharedCountsBase, MoeCommWorkspace workspace, int ...
5
2
2
[]
[ "B200", "B300", "BLACKWELL", "CPU", "H100", "SM100", "SM103", "SM120" ]
[ "1.122930×", "1.121959×", "1.122930×", "1.065517×", "1.198880×", "1.121959×", "1.059156×", "1.200922×", "1.063248×", "1.059156×" ]
Optimize this cuda kernel file from flashinfer (csrc/trtllm_alltoall_prepare.cu). Goal: feat(cake_comm): add optimized Blackwell MoE all-reduce fusion backend Target hardware: B200, B300, BLACKWELL, CPU, H100, SM100, SM103, SM120 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2022-2024, NVIDIA C...
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. <!-- .github/pull_request_template.md --> ## 📌 Description This PR adds the opt-in `backend="cake"` implementa...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.021321571, "optimized": 0.018987444, "stated_speedup": null, "speedup": 1.1229}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "b...
1.122
null
flashinfer
892b22dc5a5d48258e12434cfa045cb71fe9dad7
2026-09-16T10:32:53+08:00
4,917
https://github.com/flashinfer-ai/flashinfer/pull/4917
perf(gdn): optimize SM100 CP kernels (#4917)
perf(gdn): optimize SM100 CP kernels (#4917) ## Description This PR ports the useful SM100 CP kernel optimizations identified while comparing the CuTeDSL implementation with the CAKE-generated kernels in #4539: - vectorize state loads in the final prefill kernel; - interleave fixup accumulators to expose instruction...
flashinfer/gdn_kernels/delta_rule_dsl/varlen_helper.py
cute_dsl
Apache-2.0
import math import torch import cutlass import cutlass.cute as cute BLK = 64 CP_CHUNK_LEN_GRANULARITY = 512 CP_DEFAULT_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_NUMERATOR = 1 CP_DEFAULT_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_DENOMINATOR = 1 CP_SM120_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_NUMERATOR = 1 CP_SM120_SHORT_FIXUP...
import math import torch import cutlass import cutlass.cute as cute BLK = 64 CP_CHUNK_LEN_GRANULARITY = 512 CP_DEFAULT_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_NUMERATOR = 1 CP_DEFAULT_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_DENOMINATOR = 1 CP_SM120_SHORT_FIXUP_TO_PREFILL_WORKLOAD_RATIO_NUMERATOR = 1 CP_SM120_SHORT_FIXUP...
--- flashinfer/gdn_kernels/delta_rule_dsl/varlen_helper.py +++ flashinfer/gdn_kernels/delta_rule_dsl/varlen_helper.py @@ -190,9 +190,7 @@ @cute.jit -def chunk_bound( - seq_idx: cutlass.Int32, total, chunk_size: cutlass.Int32 -) -> cutlass.Int32: +def chunk_bound(seq_idx: cutlass.Int32, total, chunk_size) -> cut...
7
6
3
[]
[ "B200", "SM100" ]
[ "1.07x", "1.12x", "1.18x", "1.23x", "1.24x", "1.26x", "1.02x", "1.04x", "1.07x", "1.11x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gdn_kernels/delta_rule_dsl/varlen_helper.py). Goal: perf(gdn): optimize SM100 CP kernels Target hardware: B200, SM100 Target models: unspecified Current file: ```python import math import torch import cutlass import cutlass.cute as cute BLK = 64 CP_CHU...
## Description This PR ports the useful SM100 CP kernel optimizations identified while comparing the CuTeDSL implementation with the CAKE-generated kernels in #4539: - vectorize state loads in the final prefill kernel; - interleave fixup accumulators to expose instruction-level parallelism; - reuse gate factors and e...
[{"scope": "e2e", "hardware": "NVIDIA B200", "model": "397B/122B TP8", "shape": "h_qk=2,h_v=8", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.353, "optimized": 0.33, "stated_speedup": 1.07, "speedup": 1.0697}, {"scope": "e2e", "hardware": "NVIDIA B200", "model": "397B/122B...
null
1.0305
flashinfer
5ed46a9ee125f167fd1070be9aa081d70e92b366
2026-09-14T14:22:24-07:00
4,737
https://github.com/flashinfer-ai/flashinfer/pull/4737
Paged-MQA logits: Rubin (SM107) enablement, FP4 next_n=4, and DKG epilogue/scheduler optimizations (#4737)
Paged-MQA logits: Rubin (SM107) enablement, FP4 next_n=4, and DKG epilogue/scheduler optimizations (#4737) ## 📌 Description Three changes to the paged-MQA logits kernels (`flashinfer.attn_scores`): enable them on Rubin (SM107), support FP4 `next_n=4` on both architectures — natively on Rubin, via an in-kernel atom s...
flashinfer/attn_scores/kernels/schedule_kernel.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...
# 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...
--- flashinfer/attn_scores/kernels/schedule_kernel.py +++ flashinfer/attn_scores/kernels/schedule_kernel.py @@ -204,8 +204,11 @@ from ...jit.cute_dsl_core import build_and_load_cute_dsl_kernel sym_B = cute.sym_int() - cl_fake = cute.runtime.make_fake_compact_tensor( - cutlass.Int32, (sym_B,), stri...
5
2
8
[]
[ "B200", "BLACKWELL", "SM100", "SM103", "SM107", "SM80" ]
[ "1.26×", "1.37×", "1.20×", "1.55×", "1.7×", "1.405×", "2.4×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/attn_scores/kernels/schedule_kernel.py). Goal: Paged-MQA logits: Rubin (SM107) enablement, FP4 next_n=4, and DKG epilogue/scheduler optimizations Target hardware: B200, BLACKWELL, SM100, SM103, SM107, SM80 Target models: unspecified Current file: ```pytho...
## 📌 Description Three changes to the paged-MQA logits kernels (`flashinfer.attn_scores`): enable them on Rubin (SM107), support FP4 `next_n=4` on both architectures — natively on Rubin, via an in-kernel atom split on Blackwell — and port the epilogue/scheduler optimizations from DKG MR !26202. ### 1. Enable paged-M...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "batch_size": null, "metric": "performance", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.047, "speedup": 1.047}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": null, "batch_size":...
1.55
null
flashinfer
db0cdc26b0060e7d2419013f9e55bc73ee4b4425
2026-09-14T10:31:18-07:00
4,736
https://github.com/flashinfer-ai/flashinfer/pull/4736
perf(attention): specialize paged FA2 equal-stride KV (#4736)
perf(attention): specialize paged FA2 equal-stride KV (#4736) ## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relev...
csrc/batch_pod.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/batch_pod.cu +++ csrc/batch_pod.cu @@ -90,15 +90,10 @@ const auto q_stride_n_p = q_p.stride(0); const auto q_stride_h_p = q_p.stride(1); - // get kv_cache_strides - const int64_t* kv_cache_strides_p = nullptr; + // get independent K/V cache strides auto k_strides_p = paged_k_cache_p.strides(); ...
6
16
10
[ "llama", "gpt-oss" ]
[ "B300", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/batch_pod.cu). Goal: perf(attention): specialize paged FA2 equal-stride KV Target hardware: B300, SM103 Target models: llama, gpt-oss Current file: ```cuda /* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "Licen...
## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relevant K/V strides once during host dispatch and selects a compile...
[]
null
null
flashinfer
db0cdc26b0060e7d2419013f9e55bc73ee4b4425
2026-09-14T10:31:18-07:00
4,736
https://github.com/flashinfer-ai/flashinfer/pull/4736
perf(attention): specialize paged FA2 equal-stride KV (#4736)
perf(attention): specialize paged FA2 equal-stride KV (#4736) ## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relev...
csrc/batch_prefill.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/batch_prefill.cu +++ csrc/batch_prefill.cu @@ -23,7 +23,7 @@ namespace flashinfer { -template <uint32_t CTA_TILE_Q, uint32_t HEAD_DIM_QK, uint32_t HEAD_DIM_VO, +template <bool SAME_KV_STRIDES, uint32_t CTA_TILE_Q, uint32_t HEAD_DIM_QK, uint32_t HEAD_DIM_VO, PosEncodingMode POS_ENCODING_MODE, bo...
2
136
10
[ "llama", "gpt-oss" ]
[ "B300", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/batch_prefill.cu). Goal: perf(attention): specialize paged FA2 equal-stride KV Target hardware: B300, SM103 Target models: llama, gpt-oss Current file: ```cuda /* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "L...
## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relevant K/V strides once during host dispatch and selects a compile...
[]
null
null
flashinfer
db0cdc26b0060e7d2419013f9e55bc73ee4b4425
2026-09-14T10:31:18-07:00
4,736
https://github.com/flashinfer-ai/flashinfer/pull/4736
perf(attention): specialize paged FA2 equal-stride KV (#4736)
perf(attention): specialize paged FA2 equal-stride KV (#4736) ## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relev...
csrc/pod.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/pod.cu +++ csrc/pod.cu @@ -123,15 +123,10 @@ const auto q_stride_n_d = q_d.stride(0); const auto q_stride_h_d = q_d.stride(1); - // get kv_cache_strides - const int64_t* kv_cache_strides_d = nullptr; + // get independent K/V cache strides auto k_strides_d = paged_k_cache_d.strides(); auto v_st...
3
8
10
[ "llama", "gpt-oss" ]
[ "B300", "SM103" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/pod.cu). Goal: perf(attention): specialize paged FA2 equal-stride KV Target hardware: B300, SM103 Target models: llama, gpt-oss Current file: ```cuda /* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); ...
## 📌 Description Paged FA2 currently computes and stores independent V offsets even when K and V have identical strides. That extra address-generation work regresses common equal-stride paged decode and prefill workloads. This change: - checks the relevant K/V strides once during host dispatch and selects a compile...
[]
null
null
flashinfer
e500442f83fe9aac7969eb1c8731b6921fa6f180
2026-09-13T10:58:37-07:00
5,169
https://github.com/flashinfer-ai/flashinfer/pull/5169
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169)
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169) | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 | 0.997351× | | GB200 | 0.143053 | 0.143131 | 0.999452× | | GB300 | 0.145567 | 0.145749 | 0.998749× | | B200 | 0.171413 | 0.170973 | ...
csrc/pcie_ipc_all_reduce.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 o...
/* * 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 o...
--- csrc/pcie_ipc_all_reduce.cu +++ csrc/pcie_ipc_all_reduce.cu @@ -30,7 +30,17 @@ using fptr_t = int64_t; static_assert(sizeof(void*) == sizeof(fptr_t)); +// Local eligibility sizes this rank's optional region; the group still decides +// whether the SM120 protocol may be enabled. +bool pcie_ipc_memop_supported();...
61
3
7
[]
[ "A100", "A10G", "B200", "B300", "CPU", "GB200", "GB300", "H100", "SM100", "SM103", "SM120", "SM121", "SM80", "SM86", "SM89", "SM90" ]
[ "0.997351×", "0.999452×", "0.998749×", "1.002574×", "1.003499×", "0.949393×", "1.020006×", "1.15905×", "1.020006x", "1.039546x" ]
Optimize this cuda kernel file from flashinfer (csrc/pcie_ipc_all_reduce.cu). Goal: perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 Target hardware: A100, A10G, B200, B300, CPU, GB200, GB300, H100, SM100, SM103, SM120, SM121, SM80, SM86, SM89, SM90 Target models: unspecified 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. | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 ...
[{"scope": "kernel", "hardware": "H100", "model": null, "shape": "TP4,BF16,48MiB", "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.26097, "optimized": 0.265741, "stated_speedup": 0.982047, "speedup": 0.982}, {"scope": "kernel", "hardware": "H100", "model": null, "shape": ...
1.001
null
flashinfer
e500442f83fe9aac7969eb1c8731b6921fa6f180
2026-09-13T10:58:37-07:00
5,169
https://github.com/flashinfer-ai/flashinfer/pull/5169
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169)
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169) | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 | 0.997351× | | GB200 | 0.143053 | 0.143131 | 0.999452× | | GB300 | 0.145567 | 0.145749 | 0.998749× | | B200 | 0.171413 | 0.170973 | ...
include/flashinfer/comm/pcie_ipc_all_reduce.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 o...
/* * 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 o...
--- include/flashinfer/comm/pcie_ipc_all_reduce.cuh +++ include/flashinfer/comm/pcie_ipc_all_reduce.cuh @@ -101,10 +101,11 @@ // Copy-engine ring. Dispatched one level up, in csrc, not by all_reduce() // below -- see the guard at the top of that function. kCopyEngineRing = 4, - kCopyEngineIsland = 5, // 4+4 ...
5
3
7
[]
[ "A100", "A10G", "B200", "B300", "CPU", "GB200", "GB300", "H100", "SM100", "SM103", "SM120", "SM121", "SM80", "SM86", "SM89", "SM90" ]
[ "0.997351×", "0.999452×", "0.998749×", "1.002574×", "1.003499×", "0.949393×", "1.020006×", "1.15905×", "1.020006x", "1.039546x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/comm/pcie_ipc_all_reduce.cuh). Goal: perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 Target hardware: A100, A10G, B200, B300, CPU, GB200, GB300, H100, SM100, SM103, SM120, SM121, SM80, SM86, SM89, SM90 Target models: unspecified Cur...
> 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. | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 ...
[{"scope": "kernel", "hardware": "H100", "model": null, "shape": "TP4,BF16,48MiB", "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.26097, "optimized": 0.265741, "stated_speedup": 0.982047, "speedup": 0.982}, {"scope": "kernel", "hardware": "H100", "model": null, "shape": ...
1.001
null
flashinfer
e500442f83fe9aac7969eb1c8731b6921fa6f180
2026-09-13T10:58:37-07:00
5,169
https://github.com/flashinfer-ai/flashinfer/pull/5169
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169)
perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 (#5169) | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 | 0.997351× | | GB200 | 0.143053 | 0.143131 | 0.999452× | | GB300 | 0.145567 | 0.145749 | 0.998749× | | B200 | 0.171413 | 0.170973 | ...
include/flashinfer/comm/pcie_ipc_ce_ring.cuh
cuda
Apache-2.0
/*! * Copy-engine ring all-reduce: a second data plane beside the SM kernels. * * The seven kernels in pcie_ipc_all_reduce.cuh move every byte with SM * load/store and synchronise through the payload itself: +0.0 means "not yet * written", so a producer rewrites any real +0.0 to -0.0 and a consumer polls * its ow...
/*! * Copy-engine ring all-reduce: a second data plane beside the SM kernels. * * The seven kernels in pcie_ipc_all_reduce.cuh move every byte with SM * load/store and synchronise through the payload itself: +0.0 means "not yet * written", so a producer rewrites any real +0.0 to -0.0 and a consumer polls * its ow...
--- include/flashinfer/comm/pcie_ipc_ce_ring.cuh +++ include/flashinfer/comm/pcie_ipc_ce_ring.cuh @@ -30,6 +30,7 @@ #define FLASHINFER_COMM_PCIE_IPC_CE_RING_CUH_ #include "pcie_ipc_all_reduce.cuh" +#include "pcie_ipc_ce_memop.cuh" // This file follows the surrounding style: plain cudaError_t returns, no // fram...
40
10
7
[]
[ "A100", "A10G", "B200", "B300", "CPU", "GB200", "GB300", "H100", "SM100", "SM103", "SM120", "SM121", "SM80", "SM86", "SM89", "SM90" ]
[ "0.997351×", "0.999452×", "0.998749×", "1.002574×", "1.003499×", "0.949393×", "1.020006×", "1.15905×", "1.020006x", "1.039546x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/comm/pcie_ipc_ce_ring.cuh). Goal: perf(cake_comm): reduce PCIe CE ring publication overhead on SM120 Target hardware: A100, A10G, B200, B300, CPU, GB200, GB300, H100, SM100, SM103, SM120, SM121, SM80, SM86, SM89, SM90 Target models: unspecified Curren...
> 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. | GPU | Baseline mean (ms) | Candidate mean (ms) | Speedup | |---|---:|---:|---:| | H100 | 0.267771 | 0.268482 ...
[{"scope": "kernel", "hardware": "H100", "model": null, "shape": "TP4,BF16,48MiB", "batch_size": null, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.26097, "optimized": 0.265741, "stated_speedup": 0.982047, "speedup": 0.982}, {"scope": "kernel", "hardware": "H100", "model": null, "shape": ...
1.001
null
flashinfer
7c51384819f9e78e22a703391fd871dc15ab2630
2026-09-11T12:22:12-04:00
2,808
https://github.com/flashinfer-ai/flashinfer/pull/2808
Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 (#2808)
Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 (#2808) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> ## 🔍 Related Issues https://github.com/vllm-project/vllm/issues/26381 Root cause: torch.cuda....
csrc/bmm_fp8.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 ...
--- csrc/bmm_fp8.cu +++ csrc/bmm_fp8.cu @@ -17,11 +17,37 @@ #include <driver_types.h> #include <flashinfer/gemm/bmm_fp8.cuh> +#include <unordered_map> #include "tvm_ffi_utils.h" +namespace { + +// Handles are deliberately never destroyed. A thread_local destructor on the +// main thread may run after CUDA tear...
33
8
3
[ "llama" ]
[ "BLACKWELL" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/bmm_fp8.cu). Goal: Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 Target hardware: BLACKWELL Target models: llama Current file: ```cuda /* * Copyright (c) 2024 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "Lic...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> ## 🔍 Related Issues https://github.com/vllm-project/vllm/issues/26381 Root cause: torch.cuda.current_blas_handle() returns cublasHandle_t, but bmm_fp8 reinterpreted it as ...
[]
null
null
flashinfer
7c51384819f9e78e22a703391fd871dc15ab2630
2026-09-11T12:22:12-04:00
2,808
https://github.com/flashinfer-ai/flashinfer/pull/2808
Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 (#2808)
Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 (#2808) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> ## 🔍 Related Issues https://github.com/vllm-project/vllm/issues/26381 Root cause: torch.cuda....
csrc/flashinfer_gemm_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/flashinfer_gemm_binding.cu +++ csrc/flashinfer_gemm_binding.cu @@ -17,15 +17,14 @@ #include "tvm_ffi_utils.h" void bmm_fp8(TensorView A, TensorView B, TensorView D, TensorView A_scale, TensorView B_scale, - TensorView workspace_buffer, int64_t cublas_handle); + TensorView workspace_...
4
5
3
[ "llama" ]
[ "BLACKWELL" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/flashinfer_gemm_binding.cu). Goal: Fix bmm_fp8 cublasLt handle usage in autotuned cublas runner #26381 Target hardware: BLACKWELL Target models: llama Current file: ```cuda /* * Copyright (c) 2023 by FlashInfer team. * * Licensed under the Apache License, Versi...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> ## 🔍 Related Issues https://github.com/vllm-project/vllm/issues/26381 Root cause: torch.cuda.current_blas_handle() returns cublasHandle_t, but bmm_fp8 reinterpreted it as ...
[]
null
null
flashinfer
94b923486c9b74b59743b1dd50d32b100066fe0c
2026-09-10T19:32:08-07:00
4,856
https://github.com/flashinfer-ai/flashinfer/pull/4856
fix(fp4_gemm autotune) SM107 kernel family excluded from autotune candidates and heuristics update (#4856)
fix(fp4_gemm autotune) SM107 kernel family excluded from autotune candidates and heuristics update (#4856) <!-- .github/pull_request_template.md --> ## 📌 Description 1. SM107 kernel family is excluded from autotune candidates due to silenced import error, fixes added - Load the SM107 dense FP4 GEMM parent from Fla...
flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
--- flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py +++ flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py @@ -135,6 +135,16 @@ self.cta_sync_bar_id = 0 self.epilog_sync_bar_id = 1 self.tmem_ptr_sync_bar_id = 2 + # NamedBarrier equivalents of the two ids above, for subclas...
10
0
4
[]
[ "BLACKWELL", "SM100", "SM103", "SM107" ]
[ "16 x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py). Goal: fix(fp4_gemm autotune) SM107 kernel family excluded from autotune candidates and heuristics update Target hardware: BLACKWELL, SM100, SM103, SM107 Target models: unspecified Current file: ```python # Co...
<!-- .github/pull_request_template.md --> ## 📌 Description 1. SM107 kernel family is excluded from autotune candidates due to silenced import error, fixes added - Load the SM107 dense FP4 GEMM parent from FlashInfer's bundled CUTLASS sources. The published `nvidia-cutlass-dsl` wheels do not package the `nvidia_...
[]
null
null
flashinfer
7b40d3cb914cef34544a831994bd8d8a1a9987d2
2026-09-10T15:52:15-07:00
4,986
https://github.com/flashinfer-ai/flashinfer/pull/4986
perf(topk_varlen): gvr_2 dispatch rungs for 4K-8K rows, SM-count-aware register band, hint-free gvr_2 in auto (#4986)
perf(topk_varlen): gvr_2 dispatch rungs for 4K-8K rows, SM-count-aware register band, hint-free gvr_2 in auto (#4986) <!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #4811 (these two commits were pushed to its branch after the squash-merge, so they never landed). Both are host-side changes t...
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 @@ -33,7 +33,10 @@ ``"gvr_2"`` — self-sampling GVR V2 (sample-calibrated threshold ladders; TRT-LLM PR #17821 port). Requires a datacentre Blackwell-class GPU (sm_100/103, or Rub...
163
49
3
[]
[ "A100", "B200", "B300", "H100", "L40S", "RTX5080" ]
[ "1.7x", "5x", "1.3x", "1.8x", "12288 x", "12288 x", "131072 x", "131072 x", "4x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/topk_varlen/topk_varlen.py). Goal: perf(topk_varlen): gvr_2 dispatch rungs for 4K-8K rows, SM-count-aware register band, hint-free gvr_2 in auto Target hardware: A100, B200, B300, H100, L40S, RTX5080 Target models: unspecified Current file: ```python """ ...
<!-- .github/pull_request_template.md --> ## 📌 Description Follow-up to #4811 (these two commits were pushed to its branch after the squash-merge, so they never landed). Both are host-side changes to the `gvr_2` self-sampling top-k backend; no kernel code changes. **1. `gvr_2` dispatch rungs for compressed widths 4...
[{"scope": "e2e", "hardware": "B200", "model": null, "shape": "N=8192", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 4.46, "optimized": 3.62, "stated_speedup": null, "speedup": 1.232}, {"scope": "e2e", "hardware": "B200", "model": null, "shape": "N=8192", "batch_size": 128,...
1.45
1.4
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/fused_moe/cutlass_backend/flashinfer_cutlass_fused_moe_binding.cu
cuda
Apache-2.0
/* * 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 with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
/* * 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 with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
--- csrc/fused_moe/cutlass_backend/flashinfer_cutlass_fused_moe_binding.cu +++ csrc/fused_moe/cutlass_backend/flashinfer_cutlass_fused_moe_binding.cu @@ -922,7 +922,7 @@ tensorrt_llm::cutlass_extensions::MainloopScheduleType::SINGLE_WARPGROUP_ROLLING; if (is_single_warpgroup) { if (!mUseWfp4Afp...
1
1
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cuda kernel file from flashinfer (csrc/fused_moe/cutlass_backend/flashinfer_cutlass_fused_moe_binding.cu). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Target models: deepseek Current file: ```cuda /* * Copyright (c) 2022-2024, NVIDIA ...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/collective/sm90_epilogue_array_tma_warpspecialized_mixed_input.hpp
cpp
BSD-3-Clause
/*************************************************************************************************** * Copyright (c) 2023 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
/*************************************************************************************************** * Copyright (c) 2023 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
--- csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/collective/sm90_epilogue_array_tma_warpspecialized_mixed_input.hpp +++ csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/collective/sm90_epilogue_array_tma_warpspecialized_mixed_input.hpp @@ -66,7...
75
40
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/collective/sm90_epilogue_array_tma_warpspecialized_mixed_input.hpp). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Targe...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_cooperative_precomputed.hpp
cpp
BSD-3-Clause
/*************************************************************************************************** * Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
/*************************************************************************************************** * Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
--- csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_cooperative_precomputed.hpp +++ csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_cooperative_precomputed.hpp @@ -808,...
23
15
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_cooperative_precomputed.hpp). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Targe...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_pingpong_precomputed.hpp
cpp
BSD-3-Clause
/*************************************************************************************************** * Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
/*************************************************************************************************** * Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
--- csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_pingpong_precomputed.hpp +++ csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_pingpong_precomputed.hpp @@ -846,24 +84...
23
15
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/gemm/kernel/sm90_gemm_array_tma_warpspecialized_pingpong_precomputed.hpp). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Target m...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/launchers/moe_gemm_tma_ws_mixed_input_prebuild.h
cpp
Apache-2.0
/* * Copyright (c) 2020-2023, 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 ...
/* * Copyright (c) 2020-2023, 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 ...
--- csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/launchers/moe_gemm_tma_ws_mixed_input_prebuild.h +++ csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/launchers/moe_gemm_tma_ws_mixed_input_prebuild.h @@ -41,6 +41,11 @@ static constexpr int kPrecomputedSchedulerThreads = 128; static con...
100
15
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/launchers/moe_gemm_tma_ws_mixed_input_prebuild.h). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Target models: deepseek Current file: ```cpp...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch.h
cpp
Apache-2.0
/* * Copyright (c) 2020-2023, 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 ...
/* * Copyright (c) 2020-2023, 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 ...
--- csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch.h +++ csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch.h @@ -684,8 +684,9 @@ if (sm == 90) { using Tile = cutlass_extensions::CutlassTileConfigSM90; using Schedule = ...
3
2
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch.h). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Target models: deepseek Current file: ```cpp /* * Copyright (c)...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
72f6dfade4367ba6e68f6aee1b1393c0c902b474
2026-09-11T02:03:23+08:00
5,005
https://github.com/flashinfer-ai/flashinfer/pull/5005
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005)
perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance (#5005) ## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shap...
csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch_tma_ws_mixed_dtype.h
cpp
Apache-2.0
/* * Copyright (c) 2020-2023, 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 ...
/* * Copyright (c) 2020-2023, 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 ...
--- csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch_tma_ws_mixed_dtype.h +++ csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch_tma_ws_mixed_dtype.h @@ -306,7 +306,7 @@ DISPATCH_MIXED_DTYPE_MOE_TILE(CtaShape128x32x256B, 128, 32, 256);...
1
1
9
[ "deepseek" ]
[ "H100", "H20", "H200", "SM90" ]
[ "1.0064x", "1.0923x", "1.0470x", "1.0211x", "1.0857x", "1.0515x", "1.0014x", "1.0277x", "1.0123x", "1.0096x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_template_dispatch_tma_ws_mixed_dtype.h). Goal: perf(moe): improve SM90 mixed-input CUTLASS MoE backend performance Target hardware: H100, H20, H200, SM90 Target models: deepseek Current file: ```cpp ...
## 📌 Description This PR improves the SM90 CUTLASS mixed-input MoE backend in two areas. First, it expands the MXFP4×FP8 Humming single-warpgroup tactic set with the `(128, 64, 128)` shape for both PrefillAll and RollingRefill. The N64 shape is registered alongside the existing N8/N16/N32/N40 shapes, routed through ...
[{"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "shape": null, "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1416.928, "optimized": 1214.624, "stated_speedup": 1.1666, "speedup": 1.1666}, {"scope": "e2e", "hardware": "H20", "model": "DeepSeek-V4-Pro", "sha...
null
1.0515
flashinfer
75038cdf67a5ba577ef4b329badc301f185c5a95
2026-09-10T02:48:58+09:00
4,997
https://github.com/flashinfer-ai/flashinfer/pull/4997
perf(attention): Refresh DSL_FMHA cubins (#4997)
perf(attention): Refresh DSL_FMHA cubins (#4997) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> + Refresh DSL_FMHA cubins + Minimal change to source code to keep backward compatibility (unlike cubin builder, FlashInfer ...
flashinfer/attention/cute_dsl/fmha.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/attention/cute_dsl/fmha.py +++ flashinfer/attention/cute_dsl/fmha.py @@ -542,6 +542,11 @@ None, # skip_softmax_count None, # total_softmax_count enable_pdl, + None, + None, + None, + None, + None, ) ...
10
0
5
[]
[ "B300", "BLACKWELL", "CPU" ]
[ "1.0675x", "1.0552x", "1.0737x", "1.0751x", "1.0364x", "0.9955x", "1.0022x", "0.9523x", "1.0123x", "1.0809x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/attention/cute_dsl/fmha.py). Goal: perf(attention): Refresh DSL_FMHA cubins Target hardware: B300, BLACKWELL, CPU Target models: unspecified Current file: ```python # Copyright (c) 2026 by FlashInfer team. # # Licensed under the Apache License, Version 2....
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> + Refresh DSL_FMHA cubins + Minimal change to source code to keep backward compatibility (unlike cubin builder, FlashInfer needs to ensure JIT source compatibility with mult...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "S=2048", "batch_size": 2, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.0648, "optimized": 0.060704, "stated_speedup": 1.0675, "speedup": 1.0675}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "S=2048", "ba...
1.0458
null
flashinfer
75038cdf67a5ba577ef4b329badc301f185c5a95
2026-09-10T02:48:58+09:00
4,997
https://github.com/flashinfer-ai/flashinfer/pull/4997
perf(attention): Refresh DSL_FMHA cubins (#4997)
perf(attention): Refresh DSL_FMHA cubins (#4997) <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> + Refresh DSL_FMHA cubins + Minimal change to source code to keep backward compatibility (unlike cubin builder, FlashInfer ...
flashinfer/cute_dsl/attention/fmha/compile.py
cute_dsl
Apache-2.0
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. 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 # # ht...
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. 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 # # ht...
--- flashinfer/cute_dsl/attention/fmha/compile.py +++ flashinfer/cute_dsl/attention/fmha/compile.py @@ -117,6 +117,11 @@ mask_type=_mask_type(has_window_left or has_window_right), enable_ex2_emulation=enable_ex2_emulation, enable_skip_correction=True, + # Rescale threshold compresses t...
16
2
5
[]
[ "B300", "BLACKWELL", "CPU" ]
[ "1.0675x", "1.0552x", "1.0737x", "1.0751x", "1.0364x", "0.9955x", "1.0022x", "0.9523x", "1.0123x", "1.0809x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/attention/fmha/compile.py). Goal: perf(attention): Refresh DSL_FMHA cubins Target hardware: B300, BLACKWELL, CPU Target models: unspecified Current file: ```python # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All ...
<!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> + Refresh DSL_FMHA cubins + Minimal change to source code to keep backward compatibility (unlike cubin builder, FlashInfer needs to ensure JIT source compatibility with mult...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "S=2048", "batch_size": 2, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.0648, "optimized": 0.060704, "stated_speedup": 1.0675, "speedup": 1.0675}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "S=2048", "ba...
1.0458
null
flashinfer
af9b148e9133880154e33dc22205403b8b9698e6
2026-09-08T17:44:35+02:00
4,067
https://github.com/flashinfer-ai/flashinfer/pull/4067
perf(moe): phase NVFP4 dispatch payload copies at EP4/EP8/EP16 (#4067)
perf(moe): phase NVFP4 dispatch payload copies at EP4/EP8/EP16 (#4067) ## Summary Follow-up to #3846. The generic dispatch kernel makes every CTA thread build remote destination pointers for every payload before determining whether that thread owns any bytes. NVFP4 has four predictably asymmetric payloads, so this ch...
csrc/nv_internal/tensorrt_llm/kernels/communicationKernels/moeAlltoAllKernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2025, 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 requi...
/* * Copyright (c) 2025, 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 requi...
--- csrc/nv_internal/tensorrt_llm/kernels/communicationKernels/moeAlltoAllKernels.cu +++ csrc/nv_internal/tensorrt_llm/kernels/communicationKernels/moeAlltoAllKernels.cu @@ -35,8 +35,25 @@ #define DISABLE_SYNC_FOR_PROFILING 0 constexpr int kEp4Size = 4; +// Two 32-thread warps can cover at most 64 16-byte activatio...
200
21
1
[ "nemotron" ]
[ "GB200" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/nv_internal/tensorrt_llm/kernels/communicationKernels/moeAlltoAllKernels.cu). Goal: perf(moe): phase NVFP4 dispatch payload copies at EP4/EP8/EP16 Target hardware: GB200 Target models: nemotron Current file: ```cuda /* * Copyright (c) 2025, NVIDIA CORPORATION. Al...
## Summary Follow-up to #3846. The generic dispatch kernel makes every CTA thread build remote destination pointers for every payload before determining whether that thread owns any bytes. NVFP4 has four predictably asymmetric payloads, so this change gives each payload only the workers it needs: - two warps for pack...
[{"scope": "kernel", "hardware": "GB200", "model": "H2048", "shape": "top-k=22", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 13.48, "optimized": 12.862, "stated_speedup": null, "speedup": 1.048}, {"scope": "kernel", "hardware": "GB200", "model": "H2048", "shape": "top-k=22...
1.2244
1.0249
flashinfer
b255f54480b7754ea094a43575d0c2cfbd0bff18
2026-09-04T01:39:10+02:00
4,545
https://github.com/flashinfer-ai/flashinfer/pull/4545
Add ReplaySSM autotuning (#4545)
Add ReplaySSM autotuning (#4545) ## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages...
csrc/checkpointing_ssu.cu
cuda
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 ...
/* * 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 ...
--- csrc/checkpointing_ssu.cu +++ csrc/checkpointing_ssu.cu @@ -20,6 +20,8 @@ #include <flashinfer/mamba/checkpointing_ssu.cuh> #include <flashinfer/mamba/launch_checkpointing_ssu.cuh> // clang-format on +#include <limits> + #include "tvm_ffi_utils.h" using namespace flashinfer; @@ -56,7 +58,9 @@ Optional<T...
26
8
7
[ "nemotron" ]
[ "H100" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/checkpointing_ssu.cu). Goal: Add ReplaySSM autotuning Target hardware: H100 Target models: nemotron Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file...
## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages and CTAs per SM as runtime launch...
[]
null
null
flashinfer
b255f54480b7754ea094a43575d0c2cfbd0bff18
2026-09-04T01:39:10+02:00
4,545
https://github.com/flashinfer-ai/flashinfer/pull/4545
Add ReplaySSM autotuning (#4545)
Add ReplaySSM autotuning (#4545) ## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages...
csrc/checkpointing_ssu_jit_binding.cu
cuda
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 ...
/* * 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 ...
--- csrc/checkpointing_ssu_jit_binding.cu +++ csrc/checkpointing_ssu_jit_binding.cu @@ -41,14 +41,16 @@ bool dt_softplus, Optional<TensorView> state_batch_indices, // (batch,) int32 int64_t pad_slot_id, - Optional<TensorView> state_scale, // (cache, nheads, dim) f32 - Optional<TensorView> rand_s...
10
8
7
[ "nemotron" ]
[ "H100" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/checkpointing_ssu_jit_binding.cu). Goal: Add ReplaySSM autotuning Target hardware: H100 Target models: nemotron Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not u...
## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages and CTAs per SM as runtime launch...
[]
null
null
flashinfer
b255f54480b7754ea094a43575d0c2cfbd0bff18
2026-09-04T01:39:10+02:00
4,545
https://github.com/flashinfer-ai/flashinfer/pull/4545
Add ReplaySSM autotuning (#4545)
Add ReplaySSM autotuning (#4545) ## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages...
csrc/checkpointing_ssu_kernel_inst.cu
cuda
Apache-2.0
// clang-format off #include "checkpointing_ssu_config.inc" #include <flashinfer/mamba/checkpointing_ssu.cuh> #include <flashinfer/mamba/launch_checkpointing_ssu.cuh> // clang-format on namespace flashinfer::mamba::checkpointing { template void launchCheckpointingSsu<input_t, dt_t, weight_t, matrixA_t, state_t, state...
// clang-format off #include "checkpointing_ssu_config.inc" #include <flashinfer/mamba/checkpointing_ssu.cuh> #include <flashinfer/mamba/launch_checkpointing_ssu.cuh> // clang-format on namespace flashinfer::mamba::checkpointing { template void launchCheckpointingSsu<input_t, dt_t, weight_t, matrixA_t, state_t, state...
--- csrc/checkpointing_ssu_kernel_inst.cu +++ csrc/checkpointing_ssu_kernel_inst.cu @@ -7,6 +7,7 @@ namespace flashinfer::mamba::checkpointing { template void launchCheckpointingSsu<input_t, dt_t, weight_t, matrixA_t, state_t, stateIndex_t, - state_scale_t>(CheckpointingSsuParams...
2
1
7
[ "nemotron" ]
[ "H100" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/checkpointing_ssu_kernel_inst.cu). Goal: Add ReplaySSM autotuning Target hardware: H100 Target models: nemotron Current file: ```cuda // clang-format off #include "checkpointing_ssu_config.inc" #include <flashinfer/mamba/checkpointing_ssu.cuh> #include <flashinfer/...
## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages and CTAs per SM as runtime launch...
[]
null
null
flashinfer
b255f54480b7754ea094a43575d0c2cfbd0bff18
2026-09-04T01:39:10+02:00
4,545
https://github.com/flashinfer-ai/flashinfer/pull/4545
Add ReplaySSM autotuning (#4545)
Add ReplaySSM autotuning (#4545) ## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages...
include/flashinfer/mamba/launch_checkpointing_ssu.cuh
cuda
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 ...
/* * 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 ...
--- include/flashinfer/mamba/launch_checkpointing_ssu.cuh +++ include/flashinfer/mamba/launch_checkpointing_ssu.cuh @@ -62,6 +62,7 @@ template <typename input_t, typename dt_t, typename weight_t, typename matrixA_t, typename state_t, typename stateIndex_t, typename state_scale_t, int D_SPLIT, bool VARLEN> ...
12
3
7
[ "mamba", "nemotron" ]
[ "H100" ]
[]
Optimize this cuda kernel file from flashinfer (include/flashinfer/mamba/launch_checkpointing_ssu.cuh). Goal: Add ReplaySSM autotuning Target hardware: H100 Target models: mamba, nemotron Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "Lice...
## Summary Adds framework-agnostic runtime autotuning for ReplaySSM checkpointing SSU. For eligible dense decode workloads, FlashInfer profiles supported monolithic and two-kernel launches and caches the fastest tactic for reuse. ## What changes - Exposes main-kernel pipeline stages and CTAs per SM as runtime launch...
[]
null
null
flashinfer
6f9a513ab9046319d765dd8c6c7085439a29afbf
2026-09-02T10:57:09-07:00
4,752
https://github.com/flashinfer-ai/flashinfer/pull/4752
perf(sparse mla): Update sparse MLA half-Q-tile heuristic to apply to short queries only (#4752)
perf(sparse mla): Update sparse MLA half-Q-tile heuristic to apply to short queries only (#4752) ## 📌 Description ### Summary This PR restricts the sparse-MLA half-Q-tile heuristic to short queries (`mMaxSeqLenQ <= 16`). Short decode/MTP queries retain the existing Q8 choice, while long-query DeepSeek-V4 prefill us...
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 @@ -794,10 +794,11 @@ SelectKernelParams& selectKernelParams) const { // numHeadsQ <= 32 : SwapsMmaAbForGeneration // Non-power-of-two head counts use one padded Q8/Q...
13
8
1
[ "deepseek" ]
[ "B200" ]
[ "1x", "1.000x", "1.002x", "1.001x", "1.162x", "1.277x", "1.662x", "1.897x", "1.886x", "8x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/trtllm/fmha/fmhaKernels.cuh). Goal: perf(sparse mla): Update sparse MLA half-Q-tile heuristic to apply to short queries only Target hardware: B200 Target models: deepseek Current file: ```cuda /* * Copyright (c) 2020-2026, NVIDIA CORPORATION. All rig...
## 📌 Description ### Summary This PR restricts the sparse-MLA half-Q-tile heuristic to short queries (`mMaxSeqLenQ <= 16`). Short decode/MTP queries retain the existing Q8 choice, while long-query DeepSeek-V4 prefill uses Q16. The existing heuristic considers the number of KV-split CTAs and batch size, but not the ...
[{"scope": "kernel", "hardware": "B200", "model": "DeepSeek-V4", "shape": "N=16384,K=16384,num_qo_heads=16,num_kv_heads=1,head_dim=512", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 4.931104, "optimized": 2.614256, "stated_speedup": 1.886, "speedup": 1.8862}, {"scope": "ker...
1.7688
1.1039
flashinfer
2c78870399f72bdeaf5dad4ee8939a10ff331c5b
2026-08-31T23:31:41-07:00
4,773
https://github.com/flashinfer-ai/flashinfer/pull/4773
fix: skip SM107 low-latency GEMM cubins on Blackwell (#4773) (#4848)
fix: skip SM107 low-latency GEMM cubins on Blackwell (#4773) (#4848) ## 📌 Description Port of #4786 (plus the #4792 `Sm100f`/sm107 allowance) onto `main`. After #4648 the trtllm-gen GEMM pack is a single multi-arch artifact, so `getValidTactics()` on the low-latency runner returned SM107 cubins on Blackwell. Autotun...
csrc/trtllm_low_latency_gemm_runner.cu
cuda
Apache-2.0
/* * Copyright (c) 2020-2025, 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 ...
/* * Copyright (c) 2020-2025, 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 ...
--- csrc/trtllm_low_latency_gemm_runner.cu +++ csrc/trtllm_low_latency_gemm_runner.cu @@ -19,6 +19,7 @@ #include <tvm/ffi/error.h> #include <tvm_ffi_utils.h> +#include <algorithm> #include <vector> #include "flashinfer/exception.h" @@ -36,6 +37,29 @@ using tvm::ffi::Array; using tvm::ffi::Optional; + +names...
35
0
1
[]
[ "B200", "B300", "BLACKWELL", "SM100", "SM103", "SM107" ]
[]
Optimize this cuda kernel file from flashinfer (csrc/trtllm_low_latency_gemm_runner.cu). Goal: fix: skip SM107 low-latency GEMM cubins on Blackwell (#4773) Target hardware: B200, B300, BLACKWELL, SM100, SM103, SM107 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2020-2025, NVIDIA CORPORATION. A...
[]
null
null
flashinfer
72e5c3ab632247eab680dd953a6debf72e141c2e
2026-09-01T13:05:35+09:00
4,746
https://github.com/flashinfer-ai/flashinfer/pull/4746
perf(attention): cut NVFP4 KV dequant instructions on targets without native FP4/FP8 conversion (#4746)
perf(attention): cut NVFP4 KV dequant instructions on targets without native FP4/FP8 conversion (#4746) <!-- .github/pull_request_template.md --> ## 📌 Description NVFP4 KV cache works on pre-SM100 but was never performance-tuned there. On sm_80 (head_dim 128, 32/8 heads, page_size 16) NVFP4 KV costs **6.8–8.2x FP8 ...
include/flashinfer/vec_dtypes.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 ...
--- include/flashinfer/vec_dtypes.cuh +++ include/flashinfer/vec_dtypes.cuh @@ -414,7 +414,82 @@ } }; +// E2M1 nibble decoding helpers. These are plain integer and 16-bit bit manipulation with no +// FP4 type in their signatures, so they sit outside the FP4 feature guard below: the tile +// repack in attention/pr...
107
0
2
[]
[ "HOPPER", "SM100", "SM80", "SM86", "SM89", "SM90" ]
[ "8.2x", "5.4x", "6.75x", "1.0x", "1.0x", "6.76x", "2.43x", "8.17x", "2.97x", "6.78x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/vec_dtypes.cuh). Goal: perf(attention): cut NVFP4 KV dequant instructions on targets without native FP4/FP8 conversion Target hardware: HOPPER, SM100, SM80, SM86, SM89, SM90 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2023 by ...
<!-- .github/pull_request_template.md --> ## 📌 Description NVFP4 KV cache works on pre-SM100 but was never performance-tuned there. On sm_80 (head_dim 128, 32/8 heads, page_size 16) NVFP4 KV costs **6.8–8.2x FP8 KV in prefill and 4.4–5.4x in decode**, even though it reads *half* the bytes FP8 does. FP8 KV — which al...
[{"scope": "kernel", "hardware": "sm_80", "model": null, "shape": "head_dim=128,32/8 heads,page_size=16", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 12.616, "optimized": 4.531, "stated_speedup": null, "speedup": 2.7844}, {"scope": "kernel", "hardware": "sm_80", "model": n...
2.8778
null
flashinfer
9caa4488a485bb34ac05a065b694b28ca21b2b4e
2026-08-26T16:08:54-07:00
4,733
https://github.com/flashinfer-ai/flashinfer/pull/4733
perf(activation): cap act_and_mul_kernel block size for ~17-19% speedup at large hidden dims (#4733)
perf(activation): cap act_and_mul_kernel block size for ~17-19% speedup at large hidden dims (#4733) ## Description **~17-19% faster `act_and_mul_kernel`** (used by `silu_and_mul` / `gelu_and_mul` / `gelu_tanh_and_mul`) **at large hidden dims** — measured 1.17x–1.19x at `d=8192` on NVIDIA B200 (see Performance Result...
include/flashinfer/activation.cuh
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 ...
--- include/flashinfer/activation.cuh +++ include/flashinfer/activation.cuh @@ -26,7 +26,9 @@ namespace activation { template <typename T, float (*Activation)(const float&)> -__global__ void act_and_mul_kernel(T* __restrict__ out, const T* __restrict__ input, const int d) { +__global__ __launch_bounds__(256) void a...
3
1
2
[]
[ "B200", "HOPPER", "SM100", "SM120", "SM90" ]
[ "1.17x", "1.19x", "16384 ×", "1.17x", "4096 ×", "1.19x" ]
Optimize this cuda kernel file from flashinfer (include/flashinfer/activation.cuh). Goal: perf(activation): cap act_and_mul_kernel block size for ~17-19% speedup at large hidden dims Target hardware: B200, HOPPER, SM100, SM120, SM90 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2024 by FlashInf...
## Description **~17-19% faster `act_and_mul_kernel`** (used by `silu_and_mul` / `gelu_and_mul` / `gelu_tanh_and_mul`) **at large hidden dims** — measured 1.17x–1.19x at `d=8192` on NVIDIA B200 (see Performance Results below) — by capping the kernel's thread block size instead of letting it scale up to 1024 threads. ...
[{"scope": "kernel", "hardware": "NVIDIA B200", "model": null, "shape": "tokens=16384,hidden=8192", "batch_size": 16384, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 139.3, "optimized": 119.3, "stated_speedup": 1.17, "speedup": 1.1676}, {"scope": "kernel", "hardware": "NVIDIA B200", "model"...
1.1804
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/cute_dsl/proxy_score_fp4_sm12x.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/msa_ops/cute_dsl/proxy_score_fp4_sm12x.py +++ flashinfer/msa_ops/cute_dsl/proxy_score_fp4_sm12x.py @@ -651,6 +651,7 @@ paged: bool = False, qhead_per_kv: int = _QHEAD_PER_KV, pack_q_len: int = _PACK_Q_LEN, + qoff_default: bool = False, ): super().__init__(h...
10
3
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/cute_dsl/proxy_score_fp4_sm12x.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer team. ...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/cute_dsl/proxy_score_sm12x.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/msa_ops/cute_dsl/proxy_score_sm12x.py +++ flashinfer/msa_ops/cute_dsl/proxy_score_sm12x.py @@ -531,6 +531,7 @@ kv_fp8: bool = False, qhead_per_kv: int = 4, pack_q_len: int = 16, + qoff_default: bool = False, ): super().__init__( head_dim=head_d...
17
6
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/cute_dsl/proxy_score_sm12x.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer team. Lic...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/cute_dsl/topk_select_countrank_sm12x.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/msa_ops/cute_dsl/topk_select_countrank_sm12x.py +++ flashinfer/msa_ops/cute_dsl/topk_select_countrank_sm12x.py @@ -21,7 +21,7 @@ import cutlass import cutlass.cute as cute -from .topk_select_radix_sm12x import _atomic_add_i32 +from .topk_select_radix_sm12x import _atomic_add_i32, _radix_key # SMEM...
2
10
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/cute_dsl/topk_select_countrank_sm12x.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer ...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/cute_dsl/topk_select_radix_sm12x.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/msa_ops/cute_dsl/topk_select_radix_sm12x.py +++ flashinfer/msa_ops/cute_dsl/topk_select_radix_sm12x.py @@ -48,6 +48,19 @@ res=av.type, op=nvvm.AtomicOpKind.ADD, ptr=ptr.llvm_ptr, a=av ) return nvvm.atomicrmw(op=nvvm.AtomicOpKind.ADD, ptr=ptr.llvm_ptr, a=av) + + +@cute.jit +def ...
15
10
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/cute_dsl/topk_select_radix_sm12x.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer team...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/proxy_score.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/msa_ops/proxy_score.py +++ flashinfer/msa_ops/proxy_score.py @@ -477,10 +477,10 @@ q = q.to(torch.bfloat16) q_fp8 = False - # Right-aligned decode on the stream and key-major paths computes the - # causal limit in-kernel, so no offset tensor (and its build kernels, - # which ...
26
10
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/proxy_score.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer team. Licensed under the...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
8c5347726f30063fa1c17c4e81e75d509936d610
2026-08-25T22:12:51-04:00
4,030
https://github.com/flashinfer-ai/flashinfer/pull/4030
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030)
perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer (#4030) ## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the g...
flashinfer/msa_ops/sparse_topk_select.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/msa_ops/sparse_topk_select.py +++ flashinfer/msa_ops/sparse_topk_select.py @@ -20,6 +20,7 @@ import torch from ..api_logging import flashinfer_api +from ..trace.templates.msa import msa_topk_select_trace from ..utils import is_sm12x_supported from ._blackwell_sm100 import blackwell_msa_topk_select,...
93
1
7
[ "minimax" ]
[ "RTX5080", "SM120", "SM121" ]
[ "2.2x", "2.1x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/msa_ops/sparse_topk_select.py). Goal: perf(msa): chunked top-k and in-kernel causal offsets for the SM12x indexer Target hardware: RTX5080, SM120, SM121 Target models: minimax Current file: ```python """ Copyright (c) 2026 by FlashInfer team. Licensed un...
## 📌 Description Follow-up to #3655, which enabled MiniMax Sparse Attention (MSA) on SM120/SM121. The indexer (proxy score + top-k, the two ops that pick each query's KV blocks) stayed behind vLLM in a few regimes there. All of the gaps traced to `msa_topk_select` and its wrapper rather than to the proxy kernel: - A...
[{"scope": "kernel", "hardware": "RTX PRO 6000 Server", "model": null, "shape": "S=2k", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.31, "optimized": 1.31, "stated_speedup": null, "speedup": 1.0}, {"scope": "kernel", "hardware": "RTX 5080", "model": null, "shape": "S=2k",...
0.8972
null
flashinfer
75e834d633bc87267accc6e3f9749d18e459566a
2026-08-25T09:23:27-07:00
4,708
https://github.com/flashinfer-ai/flashinfer/pull/4708
(perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 (#4708)
(perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 (#4708) <!-- .github/pull_request_template.md --> ## 📌 Description Follow up with #4481 - Adds Qwen3.6-35B-A3B support at batches 1/2/4 for both CUDA and CuTe-DSL implementations. - Generates one geometry-specific CUDA JIT module using FI_GDN_* compil...
flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_cutedsl_sm120_pdl.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/gdn_kernels/experimental/kernel/gdn_fused_decode_cutedsl_sm120_pdl.py +++ flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_cutedsl_sm120_pdl.py @@ -18,8 +18,8 @@ Host and kernel side of the ``cutedsl_sm120_pdl`` registry impl: a two-launch CuTe-DSL implementation of the fused GDN decode st...
168
53
6
[ "qwen" ]
[ "SM120" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_cutedsl_sm120_pdl.py). Goal: (perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 Target hardware: SM120 Target models: qwen Current file: ```python """ Copyright (c) 2026 by FlashInfer team. Li...
<!-- .github/pull_request_template.md --> ## 📌 Description Follow up with #4481 - Adds Qwen3.6-35B-A3B support at batches 1/2/4 for both CUDA and CuTe-DSL implementations. - Generates one geometry-specific CUDA JIT module using FI_GDN_* compile definitions. - Passes geometry as cutlass.Constexpr to CuTe-DSL k...
[]
null
null
flashinfer
75e834d633bc87267accc6e3f9749d18e459566a
2026-08-25T09:23:27-07:00
4,708
https://github.com/flashinfer-ai/flashinfer/pull/4708
(perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 (#4708)
(perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 (#4708) <!-- .github/pull_request_template.md --> ## 📌 Description Follow up with #4481 - Adds Qwen3.6-35B-A3B support at batches 1/2/4 for both CUDA and CuTe-DSL implementations. - Generates one geometry-specific CUDA JIT module using FI_GDN_* compil...
flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_sm120.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 ...
--- flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_sm120.cu +++ flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_sm120.cu @@ -24,23 +24,54 @@ namespace { -// Fused GDN decode step for a fixed traced layer geometry: one persistent -// kernel covering the in_proj_ba GEMV, the depthwise causal...
48
17
6
[ "qwen" ]
[ "SM120" ]
[]
Optimize this cuda kernel file from flashinfer (flashinfer/gdn_kernels/experimental/kernel/gdn_fused_decode_sm120.cu). Goal: (perf) add fused_GDN_step support for Qwen 3.6 35B A3B on sm120 Target hardware: SM120 Target models: qwen Current file: ```cuda /* * Copyright (c) 2026 by FlashInfer team. * * Licensed unde...
<!-- .github/pull_request_template.md --> ## 📌 Description Follow up with #4481 - Adds Qwen3.6-35B-A3B support at batches 1/2/4 for both CUDA and CuTe-DSL implementations. - Generates one geometry-specific CUDA JIT module using FI_GDN_* compile definitions. - Passes geometry as cutlass.Constexpr to CuTe-DSL k...
[]
null
null
flashinfer
f47f2d254d78afb7bf4600170f007edd4a6b556e
2026-08-24T19:31:00+08:00
4,699
https://github.com/flashinfer-ai/flashinfer/pull/4699
perf(gdn): reduce non-CP CuTeDSL launch overhead (#4699)
perf(gdn): reduce non-CP CuTeDSL launch overhead (#4699) Cache SM90 and SM120 non-CP kernel objects and compile options, and construct CuTe tensor wrappers only during compilation. Replay compiled kernels through raw TVM-FFI arguments to remove repeated launch preparation from the eager path. follow up of #4374 for n...
flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm120.py
cute_dsl
Apache-2.0
from enum import IntEnum import torch import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline from cutlass.cute.nvgpu import warp, warpgroup, cpasync from ...utils import get_device_sm_count, _get_cache_buf from .alpha import AlphaProcessor from .collective_store_tma import CollectiveStoreTma fr...
import functools from enum import IntEnum import torch import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline from cutlass.cute.nvgpu import warp, warpgroup, cpasync from ...utils import get_device_sm_count, _get_cache_buf from .alpha import AlphaProcessor from .collective_store_tma import Coll...
--- flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm120.py +++ flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm120.py @@ -1,3 +1,4 @@ +import functools from enum import IntEnum import torch @@ -11,12 +12,18 @@ from .custom_compile_cache import ( KeyedCompileMixin, cached_compile, + get_cached_co...
135
88
2
[]
[ "SM120", "SM90" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm120.py). Goal: perf(gdn): reduce non-CP CuTeDSL launch overhead Target hardware: SM120, SM90 Target models: unspecified Current file: ```python from enum import IntEnum import torch import cutlass import cutlass.cu...
## 📌 Description Cache SM90 and SM120 non-CP kernel objects and compile options, and construct CuTe tensor wrappers only during compilation. Replay compiled kernels through raw TVM-FFI arguments to remove repeated launch preparation from the eager path. follow up of #4374 for non-CP launch path. ## 🔍 Related Issue...
[]
null
null
flashinfer
f47f2d254d78afb7bf4600170f007edd4a6b556e
2026-08-24T19:31:00+08:00
4,699
https://github.com/flashinfer-ai/flashinfer/pull/4699
perf(gdn): reduce non-CP CuTeDSL launch overhead (#4699)
perf(gdn): reduce non-CP CuTeDSL launch overhead (#4699) Cache SM90 and SM120 non-CP kernel objects and compile options, and construct CuTe tensor wrappers only during compilation. Replay compiled kernels through raw TVM-FFI arguments to remove repeated launch preparation from the eager path. follow up of #4374 for n...
flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm90.py
cute_dsl
Apache-2.0
from enum import IntEnum import torch import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline from cutlass.cute.nvgpu import warp, warpgroup, cpasync from ...utils import get_device_sm_count, _get_cache_buf from .alpha import AlphaProcessor from .collective_store_tma import CollectiveStoreTma fr...
import functools from enum import IntEnum import torch import cutlass import cutlass.cute as cute import cutlass.pipeline as pipeline from cutlass.cute.nvgpu import warp, warpgroup, cpasync from ...utils import get_device_sm_count, _get_cache_buf from .alpha import AlphaProcessor from .collective_store_tma import Coll...
--- flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm90.py +++ flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm90.py @@ -1,3 +1,4 @@ +import functools from enum import IntEnum import torch @@ -8,11 +9,14 @@ from ...utils import get_device_sm_count, _get_cache_buf from .alpha import AlphaProcessor from .coll...
134
89
2
[]
[ "SM120", "SM90" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gdn_kernels/delta_rule_dsl/delta_rule_sm90.py). Goal: perf(gdn): reduce non-CP CuTeDSL launch overhead Target hardware: SM120, SM90 Target models: unspecified Current file: ```python from enum import IntEnum import torch import cutlass import cutlass.cut...
## 📌 Description Cache SM90 and SM120 non-CP kernel objects and compile options, and construct CuTe tensor wrappers only during compilation. Replay compiled kernels through raw TVM-FFI arguments to remove repeated launch preparation from the eager path. follow up of #4374 for non-CP launch path. ## 🔍 Related Issue...
[]
null
null
flashinfer
b5993208e1ff5b86330e449ef270de15033e048f
2026-08-23T14:59:58-07:00
4,686
https://github.com/flashinfer-ai/flashinfer/pull/4686
perf(gemm): optimize CuTe DSL W4A16 dense GEMM (#4686)
perf(gemm): optimize CuTe DSL W4A16 dense GEMM (#4686) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand This optimizes the SM100/SM103 CuTe DSL dense W4A16 `mm_bf16_fp4` path added by #4466. - Compile the SM100/SM103 dense kernel at CuTe optimizer level 3 instead of its explicit level-2 overr...
flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py
cute_dsl
Apache-2.0
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """Architecture-specific CuTe-DSL backend for the BF16 x NVFP4 GEMM.""" import functools from typing import Dict, List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSpec...
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """Architecture-specific CuTe-DSL backend for the BF16 x NVFP4 GEMM.""" import functools from typing import Dict, List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSpec...
--- flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py +++ flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py @@ -606,7 +606,6 @@ _SM100_BF16_FP4_N_TILES = (8, 16, 32, 64, 128, 192) _SM100_BF16_FP4_K_TILE = 256 -_SM100_BF16_FP4_RASTER_ALONG_M = True def _sm100_bf16_fp4_tactic_configs() -> List[Tuple]: @@ -627,13 +626,14 @@ ...
8
8
1
[]
[ "B200", "B300", "SM100", "SM103" ]
[ "8 x", "1.0x", "1.059962x", "1.058944x", "1.060623x", "1.058814x", "1.021585x", "1.023894x", "1.003731x", "1.004513x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py). Goal: perf(gemm): optimize CuTe DSL W4A16 dense GEMM Target hardware: B200, B300, SM100, SM103 Target models: unspecified Current file: ```python # SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-Lice...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand This optimizes the SM100/SM103 CuTe DSL dense W4A16 `mm_bf16_fp4` path added by #4466. - Compile the SM100/SM103 dense kernel at CuTe optimizer level 3 instead of its explicit level-2 override. SM12x compilation is unchanged. - Make raster direc...
[{"scope": "kernel", "hardware": "B300", "model": null, "shape": "N=6656,K=19968", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 57.441, "optimized": 54.176, "stated_speedup": 1.059962, "speedup": 1.0603}, {"scope": "kernel", "hardware": "B300", "model": null, "shape": "N=66...
1.0248
null
flashinfer
6cbe7f17da27e3b8e497b9569aa7d1159313132f
2026-08-19T19:20:33-07:00
4,587
https://github.com/flashinfer-ai/flashinfer/pull/4587
feat(cake_backend): accelerate DeepSeek fused routing (#4587)
feat(cake_backend): accelerate DeepSeek fused routing (#4587) | Shape ([#4254](https://github.com/flashinfer-ai/flashinfer/issues/4254)) | B200 Cake/FlashInfer | GB300 Cake/FlashInfer (original) | Cake/Sonic-derived exact graph (B200 / GB300; upstream native exact API unsupported) | | --- | ---: | ---: | ---: | | T1 E...
csrc/fused_moe/noAuxTcKernels.cu
cuda
Apache-2.0
#include <cooperative_groups.h> #include <cooperative_groups/reduce.h> #include <cmath> #include "flashinfer/trtllm/fused_moe/noAuxTcKernels.h" #include "moeTopKFuncs.cuh" #include "tensorrt_llm/common/cudaTypeUtils.cuh" #include "tensorrt_llm/common/envUtils.h" #include "tvm_ffi_utils.h" using tvm::ffi::Optional; ...
#include <cooperative_groups.h> #include <cooperative_groups/reduce.h> #include <cmath> #include "flashinfer/trtllm/fused_moe/noAuxTcKernels.h" #include "moeTopKFuncs.cuh" #include "tensorrt_llm/common/cudaTypeUtils.cuh" #include "tensorrt_llm/common/envUtils.h" #include "tvm_ffi_utils.h" #ifdef FLASHINFER_CAKE_BACK...
--- csrc/fused_moe/noAuxTcKernels.cu +++ csrc/fused_moe/noAuxTcKernels.cu @@ -8,6 +8,11 @@ #include "tensorrt_llm/common/cudaTypeUtils.cuh" #include "tensorrt_llm/common/envUtils.h" #include "tvm_ffi_utils.h" + +#ifdef FLASHINFER_CAKE_BACKEND +#include "cake_deepseek_fused_routing/cake_deepseek_fused_routing_kernels...
30
0
3
[ "deepseek" ]
[ "B200", "GB300" ]
[ "1.1829x", "1.5522x", "7.6589x", "9.3881x", "1.1059x", "1.3919x", "14.4118x", "18.3243x", "1.0440x", "1.3158x" ]
Optimize this cuda kernel file from flashinfer (csrc/fused_moe/noAuxTcKernels.cu). Goal: feat(cake_backend): accelerate DeepSeek fused routing Target hardware: B200, GB300 Target models: deepseek Current file: ```cuda #include <cooperative_groups.h> #include <cooperative_groups/reduce.h> #include <cmath> #include "...
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. | Shape ([#4254](https://github.com/flashinfer-ai/flashinfer/issues/4254)) | B200 CAKE speedup vs FlashInfer base...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "T1 E384 k1 G1 kg1 f32/f32", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.1829, "speedup": 1.1829}, {"scope": "kernel", "hardware": "GB300", "model": null, "shape": ...
1.2101
1.0006
flashinfer
7319c448b7a62fb8deb3de2c878794194cb23558
2026-08-18T13:37:43-07:00
4,540
https://github.com/flashinfer-ai/flashinfer/pull/4540
perf(moe): fold W4A16 SiTU reciprocals (#4540)
perf(moe): fold W4A16 SiTU reciprocals (#4540) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand This is a focused follow-up to #4394 and #4506 for the CuTe DSL W4A16 SiTU path. - Preserve `situ_beta` as a Python scalar so the existing shared `situ_f32` helper folds its FP32 reciprocal while t...
flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain t...
--- flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py +++ flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py @@ -59,6 +59,7 @@ from .moe_w4a16_utils import decode_nvfp4_fragment_to_bf16 from .utils import ( blk_reduce_bf16, + f32_reciprocal, fmin, gelu_tanh_f32, griddepcontro...
10
3
1
[ "kimi" ]
[ "B200", "B300", "BLACKWELL", "SM103" ]
[ "8 x", "1.0x", "1.0064x", "1.0067x", "1.0099x", "1.0018x", "1.0421x", "1.0914x", "1.0644x", "1.0421x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/moe_w4a16_kernel.py). Goal: perf(moe): fold W4A16 SiTU reciprocals Target hardware: B200, B300, BLACKWELL, SM103 Target models: kimi Current file: ```python # Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All righ...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand This is a focused follow-up to #4394 and #4506 for the CuTe DSL W4A16 SiTU path. - Preserve `situ_beta` as a Python scalar so the existing shared `situ_f32` helper folds its FP32 reciprocal while tracing. - Precompute the optional up-branch reci...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "E=896,H=3584,I=3072,situ_beta=4.0,situ_linear_beta=25.0", "batch_size": 2048, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 5.683264, "optimized": 5.453744, "stated_speedup": 1.0421, "speedup": 1.0421}, {"scope": "kernel", "ha...
1.0621
null
flashinfer
3f5acea9cf8a738724f7a07b4d8b1ae4a4fa25e5
2026-08-14T13:39:52-07:00
4,506
https://github.com/flashinfer-ai/flashinfer/pull/4506
perf(moe): fold the SiTU beta reciprocal in the CuTe DSL MoE epilogue (#4506)
perf(moe): fold the SiTU beta reciprocal in the CuTe DSL MoE epilogue (#4506) `x / beta` in the SiTU gate and up branches lowers to a per-element `div.rn.f32`: folding it to `x * (1/beta)` is only legal when `1/beta` is exact, which the SiTU betas (e.g. Kimi-K3's 25.0) are not. Compute the reciprocal at trace time an...
flashinfer/fused_moe/cute_dsl/blackwell/utils.py
cute_dsl
Apache-2.0
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. 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/lice...
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. 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/lice...
--- flashinfer/fused_moe/cute_dsl/blackwell/utils.py +++ flashinfer/fused_moe/cute_dsl/blackwell/utils.py @@ -252,6 +252,18 @@ ) - cutlass.Float32(1.0) +def f32_reciprocal(value: float) -> float: + """Return ``1 / fp32(value)``, rounded to fp32. + + The reciprocal must come from the same fp32 value the k...
19
1
2
[ "kimi" ]
[ "B200", "BLACKWELL" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell/utils.py). Goal: perf(moe): fold the SiTU beta reciprocal in the CuTe DSL MoE epilogue Target hardware: B200, BLACKWELL Target models: kimi Current file: ```python # Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All righ...
`x / beta` in the SiTU gate and up branches lowers to a per-element `div.rn.f32`: folding it to `x * (1/beta)` is only legal when `1/beta` is exact, which the SiTU betas (e.g. Kimi-K3's 25.0) are not. Compute the reciprocal at trace time and multiply instead. `f32_reciprocal` derives it from the fp32 beta the kernel ...
[{"scope": "kernel", "hardware": "B200", "model": "Kimi-K3 MoE", "shape": "E=896,topK=16,hidden=3584,intermediate=3072", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 123, "optimized": 77, "stated_speedup": null, "speedup": 1.5974}, {"scope": "kernel", "hardware": "B200", "m...
1.64
null
flashinfer
ba6bf4e5b63b299952afaa768c1caa863829f309
2026-08-14T01:59:27+08:00
4,444
https://github.com/flashinfer-ai/flashinfer/pull/4444
perf(gdn): reuse pretranspose kernels across pool capacity and stride (#4444)
perf(gdn): reuse pretranspose kernels across pool capacity and stride (#4444) ## 📌 Description Make the leading pool dimension of the GDN pretranspose path dynamic: - Treat pool capacity and `stride[0]` as runtime values. - Keep `HV/V/K` and inner strides compile-time static. - Remove pool capacity and leading stri...
flashinfer/gdn_kernels/gdn_decode_pretranspose.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/gdn_kernels/gdn_decode_pretranspose.py +++ flashinfer/gdn_kernels/gdn_decode_pretranspose.py @@ -905,8 +905,6 @@ scale: float, use_qk_l2norm: bool, use_pool_indexing: bool = False, - pool_size: int = 0, - stride0: int = 0, stride1: int = 0, stride2: int = 0, stride3: i...
19
8
1
[]
[ "H800", "RTX5090", "SM120", "SM90" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gdn_kernels/gdn_decode_pretranspose.py). Goal: perf(gdn): reuse pretranspose kernels across pool capacity and stride Target hardware: H800, RTX5090, SM120, SM90 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. ...
## 📌 Description Make the leading pool dimension of the GDN pretranspose path dynamic: - Treat pool capacity and `stride[0]` as runtime values. - Keep `HV/V/K` and inner strides compile-time static. - Remove pool capacity and leading stride from the compilation cache key. - Preserve 64-bit pool-offset arithmetic. T...
[{"scope": "e2e", "hardware": "H800/SM90a and RTX 5090/SM120", "model": null, "shape": null, "batch_size": null, "metric": "cold compilation time", "unit": null, "higher_is_better": false, "baseline": null, "optimized": null, "stated_speedup": 1.62, "speedup": 1.62}]
null
1.62
flashinfer
53a1c3bd7a3f384d3a8fd1261cc99d80bcf9d188
2026-08-12T20:56:49-07:00
4,038
https://github.com/flashinfer-ai/flashinfer/pull/4038
perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 (#4038)
perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 (#4038) ## 📌 Description #3597 added `mm_bf16_fp4` (bf16 activations x nvfp4 weights) so vLLM can replace Marlin, its default W4A16 backend, with a FlashInfer kernel; DGX Spark is the lead target. On decode shapes the kernel trailed M...
flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py
cute_dsl
Apache-2.0
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """CuTe-DSL backend for the bf16 x fp4 GEMM (weight repack / kernel launch).""" from typing import List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSpec, DynamicTe...
# SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfer team. # SPDX-License-Identifier: Apache-2.0 """CuTe-DSL backend for the bf16 x fp4 GEMM (weight repack / kernel launch).""" import functools from typing import List, Optional, Tuple, cast import torch from ..autotuner import ( AutoTuner, ConstraintSp...
--- flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py +++ flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 """CuTe-DSL backend for the bf16 x fp4 GEMM (weight repack / kernel launch).""" +import functools from typing import List, Optional, Tuple, cast import torch @@ -18,6...
306
16
2
[ "qwen", "llama" ]
[ "RTX5080" ]
[ "1.011x", "1.11x", "1.014x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/gemm_bf16_fp4_cute_dsl.py). Goal: perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 Target hardware: RTX5080 Target models: qwen, llama Current file: ```python # SPDX-FileCopyrightText: Copyright (c) 2025 by FlashInfe...
## 📌 Description #3597 added `mm_bf16_fp4` (bf16 activations x nvfp4 weights) so vLLM can replace Marlin, its default W4A16 backend, with a FlashInfer kernel; DGX Spark is the lead target. On decode shapes the kernel trailed Marlin for two reasons: small-n grids underfill the GPU, and at single-token batches (m=1) to...
[{"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": "n=2048,k=7168", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 0.57, "optimized": 1.36, "stated_speedup": null, "speedup": 2.386}, {"scope": "kernel", "hardware": "DGX Spark", "model": null, "shape": "n=...
1.3857
1.08
flashinfer
53a1c3bd7a3f384d3a8fd1261cc99d80bcf9d188
2026-08-12T20:56:49-07:00
4,038
https://github.com/flashinfer-ai/flashinfer/pull/4038
perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 (#4038)
perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 (#4038) ## 📌 Description #3597 added `mm_bf16_fp4` (bf16 activations x nvfp4 weights) so vLLM can replace Marlin, its default W4A16 backend, with a FlashInfer kernel; DGX Spark is the lead target. On decode shapes the kernel trailed M...
flashinfer/gemm/kernels/cute_dsl/dense_gemm_bf16_fp4_blackwell.py
cute_dsl
BSD-3-Clause
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain...
# Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain...
--- flashinfer/gemm/kernels/cute_dsl/dense_gemm_bf16_fp4_blackwell.py +++ flashinfer/gemm/kernels/cute_dsl/dense_gemm_bf16_fp4_blackwell.py @@ -161,6 +161,8 @@ enable_pdl: bool = True, tile_swizzle: int = 1, raster_along_m: bool = True, + k_splits: int = 1, + occupancy: int = 1,...
270
138
2
[ "qwen", "llama" ]
[ "RTX5080" ]
[ "1.011x", "1.11x", "1.014x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/gemm/kernels/cute_dsl/dense_gemm_bf16_fp4_blackwell.py). Goal: perf(gemm): split-K, occupancy, and m=1 stream-GEMV decode tactics for mm_bf16_fp4 Target hardware: RTX5080 Target models: qwen, llama Current file: ```python # Copyright (c) 2025 - 2026 NVIDI...
## 📌 Description #3597 added `mm_bf16_fp4` (bf16 activations x nvfp4 weights) so vLLM can replace Marlin, its default W4A16 backend, with a FlashInfer kernel; DGX Spark is the lead target. On decode shapes the kernel trailed Marlin for two reasons: small-n grids underfill the GPU, and at single-token batches (m=1) to...
[{"scope": "kernel", "hardware": "RTX PRO 6000", "model": null, "shape": "n=2048,k=7168", "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 0.57, "optimized": 1.36, "stated_speedup": null, "speedup": 2.386}, {"scope": "kernel", "hardware": "DGX Spark", "model": null, "shape": "n=...
1.3857
1.08
flashinfer
e9fb62b74e47444eba83da71a573c9437e71cb3b
2026-08-11T18:29:38+08:00
3,761
https://github.com/flashinfer-ai/flashinfer/pull/3761
perf(moe): optimize CUTLASS fused MoE mem-bound kernels (#3761)
perf(moe): optimize CUTLASS fused MoE mem-bound kernels (#3761) <!-- .github/pull_request_template.md --> ## 📌 Description ### Key Findings We observed that the Triton implementation outperforms the FlashInfer CUTLASS fused MoE backend on Hopper for BF16 data types (#3521), and thus we started investigating kernel...
csrc/nv_internal/include/tensorrt_llm/common/cudaUtils.h
cpp
Apache-2.0
/* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. 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 Lic...
/* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. 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 Lic...
--- csrc/nv_internal/include/tensorrt_llm/common/cudaUtils.h +++ csrc/nv_internal/include/tensorrt_llm/common/cudaUtils.h @@ -388,12 +388,16 @@ return (tmp_a + tmp_b - 1) / tmp_b; } -inline int roundUp(int a, int b) { return divUp(a, b) * b; } - template <typename T, typename U, typename = std::enable_if_t<std::...
6
2
3
[ "deepseek", "qwen", "mixtral" ]
[ "HOPPER", "SM100" ]
[ "4×", "4×", "1×", "1×", "4×", "1×", "8×", "2×", "1.08x", "1.00x" ]
Optimize this cpp kernel file from flashinfer (csrc/nv_internal/include/tensorrt_llm/common/cudaUtils.h). Goal: perf(moe): optimize CUTLASS fused MoE mem-bound kernels Target hardware: HOPPER, SM100 Target models: deepseek, qwen, mixtral Current file: ```cpp /* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDI...
<!-- .github/pull_request_template.md --> ## 📌 Description ### Key Findings We observed that the Triton implementation outperforms the FlashInfer CUTLASS fused MoE backend on Hopper for BF16 data types (#3521), and thus we started investigating kernel optimization opportunities related to the associated kernels. He...
[{"scope": "e2e", "hardware": "B100", "model": "qwen3_tp1", "shape": null, "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": 1.0, "stated_speedup": 1.0, "speedup": 1.0}, {"scope": "e2e", "hardware": "B100", "model": "qwen3_tp1", "shape": null, "batch_size": 16, ...
null
1
flashinfer
e9fb62b74e47444eba83da71a573c9437e71cb3b
2026-08-11T18:29:38+08:00
3,761
https://github.com/flashinfer-ai/flashinfer/pull/3761
perf(moe): optimize CUTLASS fused MoE mem-bound kernels (#3761)
perf(moe): optimize CUTLASS fused MoE mem-bound kernels (#3761) <!-- .github/pull_request_template.md --> ## 📌 Description ### Key Findings We observed that the Triton implementation outperforms the FlashInfer CUTLASS fused MoE backend on Hopper for BF16 data types (#3521), and thus we started investigating kernel...
include/flashinfer/trtllm/common/cudaUtils.h
cpp
Apache-2.0
/* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. 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 Lic...
/* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. 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 Lic...
--- include/flashinfer/trtllm/common/cudaUtils.h +++ include/flashinfer/trtllm/common/cudaUtils.h @@ -154,12 +154,16 @@ return (tmp_a + tmp_b - 1) / tmp_b; } -inline int roundUp(int a, int b) { return divUp(a, b) * b; } - template <typename T, typename U, typename = std::enable_if_t<std::is_integral<T>::value>, ...
6
2
3
[ "deepseek", "qwen", "mixtral" ]
[ "HOPPER", "SM100" ]
[ "4×", "4×", "1×", "1×", "4×", "1×", "8×", "2×", "1.08x", "1.00x" ]
Optimize this cpp kernel file from flashinfer (include/flashinfer/trtllm/common/cudaUtils.h). Goal: perf(moe): optimize CUTLASS fused MoE mem-bound kernels Target hardware: HOPPER, SM100 Target models: deepseek, qwen, mixtral Current file: ```cpp /* * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATIO...
<!-- .github/pull_request_template.md --> ## 📌 Description ### Key Findings We observed that the Triton implementation outperforms the FlashInfer CUTLASS fused MoE backend on Hopper for BF16 data types (#3521), and thus we started investigating kernel optimization opportunities related to the associated kernels. He...
[{"scope": "e2e", "hardware": "B100", "model": "qwen3_tp1", "shape": null, "batch_size": 1, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": 1.0, "optimized": 1.0, "stated_speedup": 1.0, "speedup": 1.0}, {"scope": "e2e", "hardware": "B100", "model": "qwen3_tp1", "shape": null, "batch_size": 16, ...
null
1
flashinfer
f527314b25b9701a4d23ba0bf89e225be62780a0
2026-08-11T01:05:12-04:00
4,416
https://github.com/flashinfer-ai/flashinfer/pull/4416
perf(norm): speed up fused add RMSNorm FP4 quantization (#4416)
perf(norm): speed up fused add RMSNorm FP4 quantization (#4416) <!-- .github/pull_request_template.md --> ## 📌 Description This PR improves the fused add + RMSNorm + FP4 quantization kernel by: - Deriving row parallelism from the number of FP4 scale-factor blocks. - Using vectorized shared-memory loads and pac...
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 @@ -54,6 +54,8 @@ # PTX intrinsics - basic ops st_global_u64, get_ptr_as_int64, + get_smem_ptr_as_int32, + ld_shared_v4_u32, rcp_approx_ftz, fmin_f32, fmax_f32, @@ -88,6 +90,31 @@ ) +...
93
30
1
[]
[]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/add_rmsnorm_fp4quant.py). Goal: perf(norm): speed up fused add RMSNorm FP4 quantization Target hardware: unspecified Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License,...
<!-- .github/pull_request_template.md --> ## 📌 Description This PR improves the fused add + RMSNorm + FP4 quantization kernel by: - Deriving row parallelism from the number of FP4 scale-factor blocks. - Using vectorized shared-memory loads and packed BF16/FP16 operations for the block-size-16 single-CTA path....
[]
null
null
flashinfer
29196cf437778906c72630dc5d9850de547501de
2026-08-08T23:41:33+08:00
4,331
https://github.com/flashinfer-ai/flashinfer/pull/4331
perf(moe): persist b12x MoE CuTe-DSL kernels to the disk cache (#4331)
perf(moe): persist b12x MoE CuTe-DSL kernels to the disk cache (#4331) ## 📌 Description Rolls the on-disk CuTe-DSL kernel cache out to the three sm12x NVFP4 fused-MoE kernels (micro, static, dynamic), addressing #4317. The infrastructure landed in #3874 / #4029; @bkryu noted in #4317 that it still had to reach indiv...
flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py
cute_dsl
Apache-2.0
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import os import weakref from dataclasses import dat...
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import hashlib import os import weakref from datacla...
--- flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py +++ flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py @@ -7,6 +7,7 @@ from __future__ import annotations +import hashlib import os import weakref from dataclasses import dataclass @@ -19,11 +20,11 @@ from flashinfer.cute_dsl.utils im...
371
156
1
[]
[ "SM120", "SM121" ]
[ "135×" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py). Goal: perf(moe): persist b12x MoE CuTe-DSL kernels to the disk cache Target hardware: SM120, SM121 Target models: unspecified Current file: ```python """SM120/SM121 MoE dispatch layer — workspace, compi...
## 📌 Description Rolls the on-disk CuTe-DSL kernel cache out to the three sm12x NVFP4 fused-MoE kernels (micro, static, dynamic), addressing #4317. The infrastructure landed in #3874 / #4029; @bkryu noted in #4317 that it still had to reach individual kernels and that the core team lacked bandwidth, so this applies i...
[{"scope": "e2e", "hardware": "GB10", "model": null, "shape": null, "batch_size": null, "metric": "compile + load time", "unit": "s", "higher_is_better": false, "baseline": 17.92, "optimized": 0.13, "stated_speedup": 135, "speedup": 137.8462}, {"scope": "e2e", "hardware": "GB10", "model": null, "shape": null, "batch_si...
null
135.9007
flashinfer
553c2280a88581c7ede39aa571a54d1232854b81
2026-08-07T18:17:26+08:00
4,329
https://github.com/flashinfer-ai/flashinfer/pull/4329
feat: optimize gated SM12x dynamic NVFP4 MoE (#4329)
feat: optimize gated SM12x dynamic NVFP4 MoE (#4329) Route gated activations through the optimized branch-paired dynamic kernel while preserving the generic fallback for non-gated activations. Support SiLU, GELU-tanh, and SwiGLU-OAI without an environment toggle. <!-- .github/pull_request_template.md --> ## 📌 Descri...
flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py
cute_dsl
Apache-2.0
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import os import weakref from dataclasses import dat...
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import os import weakref from dataclasses import dat...
--- flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py +++ flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py @@ -31,7 +31,11 @@ compile_direct_micro_kernel, compiled_direct_micro_accepts_block_dim, ) -from .moe_dynamic_kernel import _TASK_SLICE_CHUNK, MoEDynamicKernel +from .moe_dynami...
14
2
2
[ "qwen" ]
[ "BLACKWELL", "SM120", "SM121" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py). Goal: feat: optimize gated SM12x dynamic NVFP4 MoE Target hardware: BLACKWELL, SM120, SM121 Target models: qwen Current file: ```python """SM120/SM121 MoE dispatch layer — workspace, compilation, and la...
Route gated activations through the optimized branch-paired dynamic kernel while preserving the generic fallback for non-gated activations. Support SiLU, GELU-tanh, and SwiGLU-OAI without an environment toggle. <!-- .github/pull_request_template.md --> ## 📌 Description This PR integrates an optimized branch-paired d...
[{"scope": "e2e", "hardware": "NVIDIA RTX PRO 5000 72GB Blackwell, SM120", "model": "Qwen3.5-35B TP1", "shape": null, "batch_size": 4096, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 1012.692, "optimized": 586.782, "stated_speedup": null, "speedup": 1.7258}, {"scope": "e2e", "hardware": "NV...
null
1.5078
flashinfer
d9c97ac13247a30f5bbc29d39f88d6a415bb7dca
2026-08-05T10:19:40-07:00
4,295
https://github.com/flashinfer-ai/flashinfer/pull/4295
perf(topk): skip output index sort for tie-break selection (#4295)
perf(topk): skip output index sort for tie-break selection (#4295) <!-- .github/pull_request_template.md --> ## 📌 Description @humansand Follow-up to #3095. `tie_break` determines which equal-valued elements are selected at the top-k boundary. Today, requesting a tie-break also promotes the public `deterministic`...
csrc/topk.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 ...
--- csrc/topk.cu +++ csrc/topk.cu @@ -57,9 +57,6 @@ cudaError_t status; auto dtype = input.dtype(); sampling::TopKTieBreak tie_break_mode = ParseTopKTieBreak(tie_break); - if (tie_break_mode != sampling::TopKTieBreak::None) { - deterministic = true; - } // Get row_states_buffer if provided (for multi-C...
0
9
3
[ "deepseek" ]
[ "B200", "SM100" ]
[ "1.141x", "1.123x", "1.182x", "1.135x", "1.071x", "1.170x", "1.080x", "1.034x", "1.145x", "1.078x" ]
Optimize this cuda kernel file from flashinfer (csrc/topk.cu). Goal: perf(topk): skip output index sort for tie-break selection Target hardware: B200, SM100 Target models: deepseek Current file: ```cuda /* * Copyright (c) 2024 by FlashInfer team. * * Licensed under the Apache License, Version 2.0 (the "License"); ...
<!-- .github/pull_request_template.md --> ## 📌 Description @humansand Follow-up to #3095. `tie_break` determines which equal-valued elements are selected at the top-k boundary. Today, requesting a tie-break also promotes the public `deterministic` flag, which runs the index-ordering finalizer even though the defau...
[{"scope": "kernel", "hardware": "NVIDIA B200", "model": null, "shape": "case=decode_b1_q1_l128k,k=2048", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 83.17, "optimized": 74.08, "stated_speedup": 1.123, "speedup": 1.1227}, {"scope": "kernel", "hardware": "NVIDIA B200", "mod...
1.102
null
flashinfer
67f76379a145f19793896394974e29e610cda912
2026-08-04T15:17:59+08:00
4,210
https://github.com/flashinfer-ai/flashinfer/pull/4210
perf: remove NVFP4 TMA input padding copy (#4210)
perf: remove NVFP4 TMA input padding copy (#4210) ## 📌 Description Remove the temporary padded input allocation and full-tensor copy from the CuTe DSL NVFP4 TMA path. The TMA tensor map now describes the physical `M` rows and relies on G2S TMA out-of-bounds zero fill for row tiles that extend into the padded scale l...
flashinfer/quantization/kernels/nvfp4_quantize.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/quantization/kernels/nvfp4_quantize.py +++ flashinfer/quantization/kernels/nvfp4_quantize.py @@ -1065,13 +1065,12 @@ global_scale: Union[Float32, cute.Tensor], stream, ): - # 3D global tensor: [padded_M, K/64, 64] so each warp's 64-col - # stripe is the contiguous inn...
5
14
1
[]
[ "B200" ]
[]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/quantization/kernels/nvfp4_quantize.py). Goal: perf: remove NVFP4 TMA input padding copy Target hardware: B200 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Version 2.0 (t...
## 📌 Description Remove the temporary padded input allocation and full-tensor copy from the CuTe DSL NVFP4 TMA path. The TMA tensor map now describes the physical `M` rows and relies on G2S TMA out-of-bounds zero fill for row tiles that extend into the padded scale layout. The FP4 output remains bounded by `M`, while...
[{"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=4096", "batch_size": 32283, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 212.446, "optimized": 59.248, "stated_speedup": null, "speedup": 3.5857}, {"scope": "kernel", "hardware": "B200", "model": null, "shape": "K=4096", "b...
1.045
null
flashinfer
496cc1dac3adefb26cb599bd74e2d5efe3a8fcd7
2026-08-03T22:00:20-04:00
3,523
https://github.com/flashinfer-ai/flashinfer/pull/3523
perf: remove dead cudaGetDeviceProperties in sm120 groupwise GEMM (#3523)
perf: remove dead cudaGetDeviceProperties in sm120 groupwise GEMM (#3523) <!-- .github/pull_request_template.md --> ## 📌 Description `CutlassGroupwiseScaledGEMMSM120` (`include/flashinfer/gemm/gemm_groupwise_sm120.cuh`) calls `cudaGetDevice` + `cudaGetDeviceProperties` on every invocation, but the resulting `device...
include/flashinfer/gemm/gemm_groupwise_sm120.cuh
cuda
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 ...
/* * 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 ...
--- include/flashinfer/gemm/gemm_groupwise_sm120.cuh +++ include/flashinfer/gemm/gemm_groupwise_sm120.cuh @@ -135,12 +135,6 @@ arguments.epilogue.thread.alpha = 1.0f; arguments.epilogue.thread.beta = 0.0f; - // Check device compute capability first - int device_id = 0; - cudaGetDevice(&device_id); - cudaDev...
0
6
1
[]
[ "H200", "SM120" ]
[]
Optimize this cuda kernel file from flashinfer (include/flashinfer/gemm/gemm_groupwise_sm120.cuh). Goal: perf: remove dead cudaGetDeviceProperties in sm120 groupwise GEMM Target hardware: H200, SM120 Target models: unspecified Current file: ```cuda /* * Copyright (c) 2025 by FlashInfer team. * * Licensed under the...
<!-- .github/pull_request_template.md --> ## 📌 Description `CutlassGroupwiseScaledGEMMSM120` (`include/flashinfer/gemm/gemm_groupwise_sm120.cuh`) calls `cudaGetDevice` + `cudaGetDeviceProperties` on every invocation, but the resulting `device_id` and `props` are never read afterwards — the values are dead (a capabil...
[]
null
null
flashinfer
5a4b54bed1dfe6f112cd4ec9bc196da517369f46
2026-08-03T14:43:37-07:00
4,285
https://github.com/flashinfer-ai/flashinfer/pull/4285
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285)
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285) ## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kerne...
flashinfer/cute_dsl/fp4_common.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/fp4_common.py +++ flashinfer/cute_dsl/fp4_common.py @@ -223,6 +223,22 @@ @dsl_user_op +def prefetch_global_l2(base_ptr: Int64, *, loc=None, ip=None) -> None: + """Prefetch a global memory line into L2.""" + llvm.inline_asm( + None, + [Int64(base_ptr).ir_value(loc=loc, ip...
226
2
8
[]
[ "RTX5080", "SM121" ]
[ "1.06x", "1.30x", "1.40x", "1.00x", "1.00x", "1.00x", "1.10x", "1.10x", "1.09x", "1.00x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/cute_dsl/fp4_common.py). Goal: perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD Target hardware: RTX5080, SM121 Target models: unspecified Current file: ```python """ Copyright (c) 2025 by FlashInfer team. Licensed under the Apache License, Ver...
## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kernels. `MoEDirectMicroKernel` takes the smallest decode batches, `MoEMi...
[{"scope": "e2e", "hardware": "DGX Spark", "model": null, "shape": "decode, batch 1-2", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.06, "speedup": 1.06}, {"scope": "e2e", "hardware": "RTX 5080", "model": null, "shape": "decode...
null
1.03
flashinfer
5a4b54bed1dfe6f112cd4ec9bc196da517369f46
2026-08-03T14:43:37-07:00
4,285
https://github.com/flashinfer-ai/flashinfer/pull/4285
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285)
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285) ## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kerne...
flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_activation.py
cute_dsl
Apache-2.0
"""Activation helper functions for the b12x fused-MoE kernels.""" from __future__ import annotations import cutlass import cutlass.cute as cute from cutlass import Float32 from flashinfer.cute_dsl.fp4_common import fmax_f32, fmin_f32 def is_gated_activation(activation: str) -> bool: return activation in ("silu...
"""Activation helper functions and metadata for the b12x fused-MoE kernels.""" from __future__ import annotations import math import cutlass import cutlass.cute as cute from cutlass import Float32 from flashinfer.cute_dsl.fp4_common import fmax_f32, fmin_f32 SWIGLUOAI_UNINTERLEAVE = "swigluoai_uninterleave" SWIGL...
--- flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_activation.py +++ flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_activation.py @@ -1,6 +1,8 @@ -"""Activation helper functions for the b12x fused-MoE kernels.""" +"""Activation helper functions and metadata for the b12x fused-MoE kernels.""" from __future__ im...
83
2
8
[]
[ "RTX5080", "SM121" ]
[ "1.06x", "1.30x", "1.40x", "1.00x", "1.00x", "1.00x", "1.10x", "1.10x", "1.09x", "1.00x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_activation.py). Goal: perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD Target hardware: RTX5080, SM121 Target models: unspecified Current file: ```python """Activation helper functions for the b12x fused-Mo...
## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kernels. `MoEDirectMicroKernel` takes the smallest decode batches, `MoEMi...
[{"scope": "e2e", "hardware": "DGX Spark", "model": null, "shape": "decode, batch 1-2", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.06, "speedup": 1.06}, {"scope": "e2e", "hardware": "RTX 5080", "model": null, "shape": "decode...
null
1.03
flashinfer
5a4b54bed1dfe6f112cd4ec9bc196da517369f46
2026-08-03T14:43:37-07:00
4,285
https://github.com/flashinfer-ai/flashinfer/pull/4285
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285)
perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD (#4285) ## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kerne...
flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py
cute_dsl
Apache-2.0
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import os import weakref from dataclasses import dat...
"""SM120/SM121 MoE dispatch layer — workspace, compilation, and launch. Ported from b12x's integration/tp_moe.py. Supports micro (tiny decode), static (decode), and dynamic (prefill) backends with token-count-based selection. """ from __future__ import annotations import os import weakref from dataclasses import dat...
--- flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py +++ flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py @@ -24,8 +24,14 @@ get_num_sm, make_ptr, ) -from .moe_activation import is_gated_activation -from .moe_dynamic_kernel import MoEDynamicKernel +from .moe_activation import SWIGLU...
410
128
8
[]
[ "RTX5080", "SM121" ]
[ "1.06x", "1.30x", "1.40x", "1.00x", "1.00x", "1.00x", "1.10x", "1.10x", "1.09x", "1.00x" ]
Optimize this cute_dsl kernel file from flashinfer (flashinfer/fused_moe/cute_dsl/blackwell_sm12x/moe_dispatch.py). Goal: perf(moe): sync SM12x NVFP4 fused-MoE kernels to b12x HEAD Target hardware: RTX5080, SM121 Target models: unspecified Current file: ```python """SM120/SM121 MoE dispatch layer — workspace, compila...
## 📌 Description Syncs the SM12x NVFP4 (W4A4) fused-MoE kernels behind `b12x_fused_moe` and `B12xMoEWrapper` with upstream [b12x](https://github.com/local-inference-lab/sparkinfer) at `f9be272`, reaching backend parity. The module now has four kernels. `MoEDirectMicroKernel` takes the smallest decode batches, `MoEMi...
[{"scope": "e2e", "hardware": "DGX Spark", "model": null, "shape": "decode, batch 1-2", "batch_size": null, "metric": "speedup", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.06, "speedup": 1.06}, {"scope": "e2e", "hardware": "RTX 5080", "model": null, "shape": "decode...
null
1.03