---
id: pr-flashinfer-1389
repo: flashinfer-ai/flashinfer
pr: 1389
title: 'GPT-OSS Support: Add Blackwell MoE mxfp4 implementation from TRTLLM and Attention Sink'
author: joker-eph
date: '2025-08-05'
url: https://github.com/flashinfer-ai/flashinfer/pull/1389
source_category: upstream-code
architectures:
- sm100
tags:
- attention
- decode
- flash-attention
- fp4
- fp8
- gemm
- kernel-fusion
- moe
- prefill
- quantization
- tma
techniques:
- kernel-fusion
hardware_features:
- fp4
- fp8
- tma
kernel_types:
- attention
- decode
- flash-attention
- gemm
- moe
- prefill
- quantization
languages:
- cuda-cpp
captured_at: '2026-04-27'
status: merged
merge_sha: 65e9092a9dd959f7392895fd494a48b9d26ac0da
inclusion_reason: kernel file changes
changed_paths:
- csrc/nv_internal/cpp/kernels/quantization.cu
- csrc/nv_internal/tensorrt_llm/kernels/quantization.cuh
- csrc/nv_internal/tensorrt_llm/kernels/quantization.h
- csrc/nv_internal/tensorrt_llm/thop/fp8Quantize.cpp
- csrc/nv_internal/tensorrt_llm/thop/fp8Quantize.h
- csrc/trtllm_batched_gemm_runner.cu
- csrc/trtllm_fmha_kernel_launcher.cu
- csrc/trtllm_fused_moe_dev_kernel.cu
- csrc/trtllm_fused_moe_kernel_launcher.cu
- csrc/trtllm_fused_moe_routing_deepseek.cu
- csrc/trtllm_fused_moe_routing_kernel.cu
- csrc/trtllm_fused_moe_routing_llama4.cu
- csrc/trtllm_fused_moe_routing_renormalize.cu
- csrc/trtllm_fused_moe_runner.cu
- csrc/trtllm_moe_allreduce_fusion.cu
- flashinfer/__init__.py
- flashinfer/artifacts.py
- flashinfer/decode.py
- flashinfer/fp8_quantization.py
- flashinfer/fused_moe/__init__.py
- flashinfer/fused_moe/core.py
- flashinfer/prefill.py
- include/flashinfer/attention/prefill.cuh
- include/flashinfer/attention/variant_helper.cuh
- include/flashinfer/trtllm/batched_gemm/KernelRunner.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/BatchedGemmInterface.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/BatchedGemmOptions.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/GemmGatedActOptions.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/GemmOptions.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelMetaInfo.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelParams.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelParamsDecl.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelTraits.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/TmaDescriptor.h
- include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/trtllm/gen/CommonUtils.h
- include/flashinfer/trtllm/fmha/fmhaRunnerParams.h
- include/flashinfer/trtllm/fmha/kernelParams.h
- include/flashinfer/trtllm/fused_moe/DevKernel.h
- include/flashinfer/trtllm/fused_moe/IntFastDiv.h
- include/flashinfer/trtllm/fused_moe/RoutingKernel.h
- include/flashinfer/trtllm/fused_moe/runner.h
- tests/sink_attention_reference.py
- tests/test_attention_sink.py
- tests/test_attention_sink_blackwell.py
- tests/test_fp8_quantize.py
- tests/test_jit_example.py
- tests/test_trtllm_gen_fused_moe.py
head_ref_oid: 55879063f1c176e2e545426a257a08145c07cc6f
artifact_dir: evidence/pull-bundles/flashinfer/gh-1389
---
# GPT-OSS Support: Add Blackwell MoE mxfp4 implementation from TRTLLM and Attention Sink

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

## Changed Paths

- `csrc/nv_internal/cpp/kernels/quantization.cu`
- `csrc/nv_internal/tensorrt_llm/kernels/quantization.cuh`
- `csrc/nv_internal/tensorrt_llm/kernels/quantization.h`
- `csrc/nv_internal/tensorrt_llm/thop/fp8Quantize.cpp`
- `csrc/nv_internal/tensorrt_llm/thop/fp8Quantize.h`
- `csrc/trtllm_batched_gemm_runner.cu`
- `csrc/trtllm_fmha_kernel_launcher.cu`
- `csrc/trtllm_fused_moe_dev_kernel.cu`
- `csrc/trtllm_fused_moe_kernel_launcher.cu`
- `csrc/trtllm_fused_moe_routing_deepseek.cu`
- `csrc/trtllm_fused_moe_routing_kernel.cu`
- `csrc/trtllm_fused_moe_routing_llama4.cu`
- `csrc/trtllm_fused_moe_routing_renormalize.cu`
- `csrc/trtllm_fused_moe_runner.cu`
- `csrc/trtllm_moe_allreduce_fusion.cu`
- `flashinfer/__init__.py`
- `flashinfer/artifacts.py`
- `flashinfer/decode.py`
- `flashinfer/fp8_quantization.py`
- `flashinfer/fused_moe/__init__.py`
- `flashinfer/fused_moe/core.py`
- `flashinfer/prefill.py`
- `include/flashinfer/attention/prefill.cuh`
- `include/flashinfer/attention/variant_helper.cuh`
- `include/flashinfer/trtllm/batched_gemm/KernelRunner.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/BatchedGemmInterface.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/BatchedGemmOptions.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/GemmGatedActOptions.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/GemmOptions.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelMetaInfo.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelParams.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelParamsDecl.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/KernelTraits.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/TmaDescriptor.h`
- `include/flashinfer/trtllm/batched_gemm/trtllmGen_bmm_export/trtllm/gen/CommonUtils.h`
- `include/flashinfer/trtllm/fmha/fmhaRunnerParams.h`
- `include/flashinfer/trtllm/fmha/kernelParams.h`
- `include/flashinfer/trtllm/fused_moe/DevKernel.h`
- `include/flashinfer/trtllm/fused_moe/IntFastDiv.h`
- `include/flashinfer/trtllm/fused_moe/RoutingKernel.h`
- `include/flashinfer/trtllm/fused_moe/runner.h`
- `tests/sink_attention_reference.py`
- `tests/test_attention_sink.py`
- `tests/test_attention_sink_blackwell.py`
- `tests/test_fp8_quantize.py`
- `tests/test_jit_example.py`
- `tests/test_trtllm_gen_fused_moe.py`

## Evidence Bundle

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