---
id: pr-flashinfer-1309
repo: flashinfer-ai/flashinfer
pr: 1309
title: Refactor Fused Moe Module
author: wenscarl
date: '2025-07-31'
url: https://github.com/flashinfer-ai/flashinfer/pull/1309
source_category: upstream-code
architectures:
- sm100
tags:
- fp4
- gemm
- kernel-fusion
- mla
- moe
- quantization
techniques:
- kernel-fusion
hardware_features:
- fp4
kernel_types:
- gemm
- mla
- moe
- quantization
languages:
- cuda-cpp
captured_at: '2026-04-27'
status: merged
merge_sha: 1b831688799de950a889062a1661589d891cf235
inclusion_reason: kernel file changes
changed_paths:
- .gitignore
- README.md
- csrc/nv_internal/cpp/kernels/quantization.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M128_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M128_BSTrue_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M256_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M256_BSTrue_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M64_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M128_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M16_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M32_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M64_BSFalse_MixedFalse.generated.cu
- csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.cpp
- flashinfer/__init__.py
- flashinfer/fused_moe/__init__.py
- flashinfer/fused_moe/core.py
- flashinfer/fused_moe/utils.py
- flashinfer/jit/cutlass_gemm/__init__.py
- flashinfer/jit/cutlass_gemm/cutlass_library.py
- flashinfer/jit/cutlass_gemm/generate_kernels.py
- flashinfer/utils.py
- pyproject.toml
- tests/conftest.py
- tests/test_deepseek_mla.py
- tests/test_fp4_quantize.py
head_ref_oid: afac4a8c2988d01cc6bc11c82b250c9371f01daa
artifact_dir: evidence/pull-bundles/flashinfer/gh-1309
---
# Refactor Fused Moe Module

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

## Changed Paths

- `.gitignore`
- `README.md`
- `csrc/nv_internal/cpp/kernels/quantization.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M128_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M128_BSTrue_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M256_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M256_BSTrue_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm100_M64_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M128_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M16_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M32_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/cutlass_instantiations/gemm_grouped/cutlass_kernel_file_GemmKind.Grouped_sm80_M64_BSFalse_MixedFalse.generated.cu`
- `csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.cpp`
- `flashinfer/__init__.py`
- `flashinfer/fused_moe/__init__.py`
- `flashinfer/fused_moe/core.py`
- `flashinfer/fused_moe/utils.py`
- `flashinfer/jit/cutlass_gemm/__init__.py`
- `flashinfer/jit/cutlass_gemm/cutlass_library.py`
- `flashinfer/jit/cutlass_gemm/generate_kernels.py`
- `flashinfer/utils.py`
- `pyproject.toml`
- `tests/conftest.py`
- `tests/test_deepseek_mla.py`
- `tests/test_fp4_quantize.py`

## Evidence Bundle

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