---
id: pr-flashinfer-2942
repo: flashinfer-ai/flashinfer
pr: 2942
title: '[Perf] Refactor MoE autotuning to set valid topk ids in routed MoE tuning'
author: wzhao18
date: '2026-04-07'
url: https://github.com/flashinfer-ai/flashinfer/pull/2942
source_category: upstream-code
architectures:
- sm100
tags:
- kernel-fusion
- moe
techniques:
- kernel-fusion
hardware_features: []
kernel_types:
- moe
languages:
- python
captured_at: '2026-04-27'
status: merged
merge_sha: 70175a0b5232a99b554df14f12742aaf257d979f
inclusion_reason: kernel file changes
changed_paths:
- benchmarks/bench_trtllm_gen_fused_moe_autotuner.py
- flashinfer-jit-cache/pyproject.toml
- flashinfer/autotuner.py
- flashinfer/fused_moe/core.py
- tests/autotuner/test_trtllm_fused_moe_autotuner_integration.py
head_ref_oid: 7834f4b0edbb0fab163b31ab11b9d8bd0a190dcd
artifact_dir: evidence/pull-bundles/flashinfer/gh-2942
---
# [Perf] Refactor MoE autotuning to set valid topk ids in routed MoE tuning

- Repository: `flashinfer-ai/flashinfer`
- PR: [2942](https://github.com/flashinfer-ai/flashinfer/pull/2942)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `benchmarks/bench_trtllm_gen_fused_moe_autotuner.py`
- `flashinfer-jit-cache/pyproject.toml`
- `flashinfer/autotuner.py`
- `flashinfer/fused_moe/core.py`
- `tests/autotuner/test_trtllm_fused_moe_autotuner_integration.py`

## Evidence Bundle

`evidence/pull-bundles/flashinfer/gh-2942`
