Skip to content
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
d0a53b5
adopt reference implementation from sglang
ishovkun Jan 29, 2026
320a72c
Extract create_test_inputs to shared test_utils module
ishovkun Jan 29, 2026
4022f10
Rename test to reflect that it's an single-token test file
ishovkun Jan 29, 2026
a8bc286
Add multi-token support to the interface of selective_state_update
ishovkun Jan 29, 2026
2e70ea4
Refactor selective_state_update: add validation helpers and update param
ishovkun Jan 29, 2026
295ae56
Non-contiguous state
ishovkun Jan 29, 2026
5541624
Simplify code for template dispatching
ishovkun Jan 29, 2026
ab33cc1
Refactor dispatch logic in selective_state_update.cuh
ishovkun Jan 29, 2026
26271a9
Refactor pointer alignement checking away from the logic.
ishovkun Jan 29, 2026
f3f02f5
Support int32 and int64 state_batch_indices in selective_state_update
ishovkun Jan 29, 2026
1cb4ac7
Refactor Mamba selective state update kernel dispatch and add dtype
ishovkun Jan 30, 2026
3265bd5
Merge branch 'flashinfer-ai:main' into main
ishovkun Jan 30, 2026
9d6d35c
Fix simple stp kernel to only write state if a flag is provided
ishovkun Jan 30, 2026
5b5756d
Fix Triton kernel intermediate state caching to match CUDA behavior
ishovkun Jan 30, 2026
e3f751e
Merge branch 'main' of github.com:ishovkun/flashinfer-dev
ishovkun Jan 31, 2026
fb693d0
Add Mamba2 SSD chunk scan test and reorganize Triton refs
ishovkun Feb 3, 2026
0ce5d47
Merge branch 'main' of github.com:ishovkun/flashinfer-dev
ishovkun Feb 17, 2026
304fd59
Enable .jinja templates for mamba
ishovkun Feb 17, 2026
329bfd0
Remove SM100 module, unify SM90+ selective state update handling
ishovkun Feb 17, 2026
f464097
Add algorithm selection to selective_state_update kernels
ishovkun Feb 18, 2026
c65670c
Fix include order: config.inc before header in selective_state_update…
ishovkun Feb 18, 2026
44b6c25
Parallelize consumer warp loads in vertical SSU kernel
ishovkun Feb 18, 2026
eff403c
Reduce test combinations in SSU tests to base + independent deviations
ishovkun Feb 18, 2026
afc7c6a
Add algorithm parameter to selective_state_update tests
ishovkun Feb 19, 2026
74accb0
Merge branch 'flashinfer-ai:main' into main
ishovkun Feb 19, 2026
1d42007
Update selective_state_update instantiations to include SSUAlgorithm
ishovkun Feb 19, 2026
61d88bd
Clarify algorithm selection docstring in selective_state_update
ishovkun Feb 19, 2026
ead4943
Merge branch 'main' of github.com:ishovkun/flashinfer-dev
ishovkun Feb 19, 2026
6f6a3d7
Remove chunk scan combined kernels as they are irrelevant to this PR
ishovkun Feb 19, 2026
de96dd5
Remove ssd_chunk_state.py Triton reference implementation (irrelevant to
ishovkun Feb 19, 2026
4c30f07
Delete test_utils.py
ishovkun Feb 19, 2026
1f1c2f4
Suppress mypy false positive for gen_selective_state_update calls
ishovkun Feb 19, 2026
157ecb5
Move Triton reference kernel to triton_reference subdir and update
ishovkun Feb 19, 2026
f32b63b
mark an unused variable with "_" in a test
ishovkun Feb 19, 2026
2656202
rename an unused test variable to _state_ref
ishovkun Feb 19, 2026
5580d28
Refactor Triton reference import for selective_state_update
ishovkun Feb 19, 2026
8738964
Add int16 state quantization with block scaling to
ishovkun Feb 19, 2026
02db096
Add int16 quantized state support to selective_state_update
ishovkun Feb 20, 2026
58f56cd
Fixes aot compilation of the gdn_prefill_sm90 module
ishovkun Feb 20, 2026
d4e33de
Merge branch 'main' into ssu_int16
ishovkun Feb 20, 2026
5d8184e
Substantially reduce the nubmer of SSU aot compilation units. Limited to
ishovkun Feb 20, 2026
9775391
Merge branch 'main' into ssu_int16
ishovkun Feb 20, 2026
7f1173f
Add int16 support for block scaling in selective_state_update kernel
ishovkun Feb 20, 2026
35cc7ba
Add int16 block scaling support to selective_state_update MTP
ishovkun Feb 20, 2026
6cf61b7
Fix rNewState array size calculation for scaleState flag
ishovkun Feb 20, 2026
e9ab619
Refactor selective_state_update to use state_scale dtype
ishovkun Feb 23, 2026
60b627e
Add Philox-4x32 PRNG matching Triton tl.randint and tests
ishovkun Feb 24, 2026
b873d10
Refactor philox_randint to template and add rounding tests
ishovkun Feb 24, 2026
3292662
Stochastic rounding support for fp16 state update (plubming)
ishovkun Feb 25, 2026
b206a5f
Implement stochastic rounding for fp16 state in selective_state_update
ishovkun Feb 25, 2026
c70efbd
Optimize Philox PRNG usage in selective_state_update kernel
ishovkun Feb 26, 2026
181d80d
Fix Philox random offset calculation for state updates
ishovkun Feb 26, 2026
fd1af7c
Remove .plans directory from .gitignore
ishovkun Feb 26, 2026
ff8dfde
Merge branch 'ssu_int16': int16 block-scaled state and stochastic rou…
ishovkun Feb 26, 2026
60bbb5d
Merge remote-tracking branch 'upstream/main'
ishovkun Feb 26, 2026
c01eced
Replace asserts with if checks in the python wrapper
ishovkun Feb 27, 2026
0bf77aa
Remove redundant dtype check for state_batch_indices and
ishovkun Feb 27, 2026
deb48a8
Use tuples instead of lists for parameter sets in tests
ishovkun Feb 27, 2026
e1d9dc3
Fix selective_state_update argument order for state_scale_dtype
ishovkun Feb 27, 2026
b30db63
Replace float pointer casts with __float_as_uint in conversion kernels
ishovkun Feb 27, 2026
317f6bb
Handle zero max value in state scaling calculations
ishovkun Feb 27, 2026
852b9a2
Add static_assert for fp16 state in SR branch to check that an edge case
ishovkun Feb 27, 2026
2ca355e
if not philox_rounds > 0:` → `if philox_rounds <= 0:` — same semantics,
ishovkun Feb 27, 2026
fa95f9d
Fix SM gencode flag to match current device compute capability (fixed
ishovkun Mar 2, 2026
3b20f6e
Fix Triton reference to skip stochastic rounding on pre-SM100a GPUs
ishovkun Mar 2, 2026
f93b325
Rename unused state_dtype and kwargs parameters to _state_dtype and
ishovkun Mar 2, 2026
6b65cff
Change _SR_PARAMS from list to tuple in test_selective_state_update_stp
ishovkun Mar 2, 2026
4cb8c40
Restore issue-claim.yml accidentally deleted during rebase
ishovkun Mar 3, 2026
10a36c4
Refactor selective_state_update to use device-side rand_seed tensor
ishovkun Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
330 changes: 0 additions & 330 deletions .github/workflows/issue-claim.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ flashinfer/cute_dsl/benchmark_gated_delta_rule.py
# vscode
.vscode/

# zed text editor
.zed/
Comment thread
yzh119 marked this conversation as resolved.
.rules

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
5 changes: 4 additions & 1 deletion csrc/flashinfer_mamba_binding.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ void selective_state_update(
bool dt_softplus,
Optional<TensorView> state_batch_indices, // (batch,)
int64_t pad_slot_id,
TensorView output, // same as x
Optional<TensorView> state_scale, // float32: (state_cache_size, nheads, dim)
TensorView output, // same as x
bool disable_state_update,
Optional<TensorView> intermediate_states_buffer, // (batch, cache_steps, nheads, dim, dstate)
Optional<TensorView> intermediate_state_indices, // (batch,)
Optional<TensorView> intermediate_state_scales, // float32: (batch, cache_steps, nheads, dim)
int64_t rand_seed, // used for Philox rounding
int64_t cache_steps,
int64_t algorithm); // SSUAlgorithm: 0=auto, 1=simple, 2=vertical, 3=horizontal

Expand Down
Loading
Loading