---
id: pr-flashinfer-2591
repo: flashinfer-ai/flashinfer
pr: 2591
title: 'Mamba SSU: better automatic kernel selection + algorithm selection optionally exposed to the user.'
author: ishovkun
date: '2026-02-22'
url: https://github.com/flashinfer-ai/flashinfer/pull/2591
source_category: upstream-code
architectures:
- sm100
tags:
- gemm
techniques: []
hardware_features: []
kernel_types: []
languages:
- cuda-cpp
- triton
captured_at: '2026-04-27'
status: merged
merge_sha: 78a0091728754b28f2e01819f9eb263940ceb735
inclusion_reason: kernel file changes
changed_paths:
- benchmarks/routines/mamba.py
- csrc/flashinfer_mamba_binding.cu
- csrc/selective_state_update.cu
- csrc/selective_state_update_customize_config.jinja
- csrc/selective_state_update_dtype_inst.jinja
- csrc/selective_state_update_kernel_inst.cu
- flashinfer/aot.py
- flashinfer/jit/mamba/__init__.py
- flashinfer/jit/mamba/selective_state_update.py
- flashinfer/mamba/selective_state_update.py
- include/flashinfer/mamba/kernel_selective_state_update_mtp.cuh
- include/flashinfer/mamba/kernel_selective_state_update_stp.cuh
- include/flashinfer/mamba/selective_state_update.cuh
- tests/mamba/test_selective_state_update_mtp.py
- tests/mamba/test_selective_state_update_stp.py
- tests/mamba/triton_reference/__init__.py
- tests/mamba/triton_reference/selective_state_update.py
- tests/mamba/triton_reference/softplus.py
head_ref_oid: 5d8184ec7b71b8a8c382134551c06410becad53d
artifact_dir: evidence/pull-bundles/flashinfer/gh-2591
---
# Mamba SSU: better automatic kernel selection + algorithm selection optionally exposed to the user.

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

## Changed Paths

- `benchmarks/routines/mamba.py`
- `csrc/flashinfer_mamba_binding.cu`
- `csrc/selective_state_update.cu`
- `csrc/selective_state_update_customize_config.jinja`
- `csrc/selective_state_update_dtype_inst.jinja`
- `csrc/selective_state_update_kernel_inst.cu`
- `flashinfer/aot.py`
- `flashinfer/jit/mamba/__init__.py`
- `flashinfer/jit/mamba/selective_state_update.py`
- `flashinfer/mamba/selective_state_update.py`
- `include/flashinfer/mamba/kernel_selective_state_update_mtp.cuh`
- `include/flashinfer/mamba/kernel_selective_state_update_stp.cuh`
- `include/flashinfer/mamba/selective_state_update.cuh`
- `tests/mamba/test_selective_state_update_mtp.py`
- `tests/mamba/test_selective_state_update_stp.py`
- `tests/mamba/triton_reference/__init__.py`
- `tests/mamba/triton_reference/selective_state_update.py`
- `tests/mamba/triton_reference/softplus.py`

## Evidence Bundle

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