Mamba SSM architecture
342 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 342 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 344 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 483 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 485 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 553 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 555 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 667 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 669 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 839 | # ================================================================== |
| MEDIUM | tests/ops/triton/test_mamba3_siso.py | 841 | # ================================================================== |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1396 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1398 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1679 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1681 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1693 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1695 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1799 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/ops/tilelang/test_mamba3_mimo.py | 1801 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/modules/test_mamba3_varlen.py | 21 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/modules/test_mamba3_varlen.py | 23 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/modules/test_mamba3_varlen.py | 55 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/modules/test_mamba3_varlen.py | 57 | # --------------------------------------------------------------------------- |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 845 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 847 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 879 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 881 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 915 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 917 | # ========================================================================= |
| MEDIUM | mamba_ssm/ops/triton/mamba3/angle_dt.py | 11 | # ----------------------------------------------------------------------------- |
| MEDIUM | mamba_ssm/ops/triton/mamba3/angle_dt.py | 13 | # ----------------------------------------------------------------------------- |
| MEDIUM | mamba_ssm/ops/triton/mamba3/angle_dt.py | 219 | # ----------------------------------------------------------------------------- |
| MEDIUM | mamba_ssm/ops/triton/mamba3/angle_dt.py | 221 | # ----------------------------------------------------------------------------- |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1409 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1411 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 56 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 60 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 131 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 135 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 220 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 224 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 354 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 358 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 440 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 442 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 516 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 518 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 725 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 732 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1005 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1008 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1700 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1702 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1844 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1846 | # ============================================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 396 | # ============================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 399 | # ============================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 406 | # ============================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 408 | # ============================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 415 | # ============================================================ |
| MEDIUM | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 417 | # ============================================================ |
| 56 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_generation.py | 8 | |
| LOW | tests/test_generation.py | 10 | |
| LOW | tests/ops/test_selective_scan.py | 3 | |
| LOW | tests/ops/test_selective_scan.py | 6 | |
| LOW | tests/ops/test_selective_scan.py | 9 | |
| LOW | tests/ops/cute/test_mamba3_mimo_step.py | 15 | |
| LOW | tests/ops/cute/test_mamba3_mimo_step.py | 18 | |
| LOW | tests/ops/triton/test_ssd.py | 1 | |
| LOW | tests/ops/triton/test_ssd.py | 8 | |
| LOW | tests/ops/triton/test_ssd.py | 10 | |
| LOW | tests/ops/triton/test_ssd.py | 13 | |
| LOW | tests/ops/triton/test_ssd.py | 13 | |
| LOW | tests/ops/triton/test_ssd.py | 15 | |
| LOW | tests/ops/triton/test_ssd.py | 15 | |
| LOW | tests/ops/triton/test_ssd.py | 16 | |
| LOW | tests/ops/triton/test_ssd.py | 16 | |
| LOW | tests/ops/triton/test_ssd.py | 16 | |
| LOW | tests/ops/triton/test_ssd.py | 16 | |
| LOW | tests/ops/triton/test_ssd.py | 17 | |
| LOW | tests/ops/triton/test_ssd.py | 17 | |
| LOW | tests/ops/triton/test_mamba3_siso.py | 11 | |
| LOW | tests/ops/triton/test_mamba3_siso.py | 14 | |
| LOW | tests/ops/triton/test_layernorm_gated.py | 1 | |
| LOW | tests/ops/triton/test_layernorm_gated.py | 8 | |
| LOW | tests/ops/triton/test_selective_state_update.py | 3 | |
| LOW | tests/ops/triton/test_selective_state_update.py | 6 | |
| LOW | tests/ops/triton/test_selective_state_update.py | 9 | |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 25 | |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 26 | |
| LOW | benchmarks/benchmark_generation_mamba_simple.py | 5 | |
| LOW | benchmarks/benchmark_generation_mamba_simple.py | 8 | |
| LOW | benchmarks/benchmark_generation_mamba_simple.py | 10 | |
| LOW | mamba_ssm/__init__.py | 3 | |
| LOW | mamba_ssm/__init__.py | 3 | |
| LOW | mamba_ssm/__init__.py | 4 | |
| LOW | mamba_ssm/__init__.py | 5 | |
| LOW | mamba_ssm/__init__.py | 6 | |
| LOW | mamba_ssm/__init__.py | 7 | |
| LOW | mamba_ssm/distributed/distributed_utils.py | 1 | |
| LOW | mamba_ssm/utils/generation.py | 3 | |
| LOW | mamba_ssm/utils/generation.py | 4 | |
| LOW | mamba_ssm/utils/generation.py | 6 | |
| LOW | mamba_ssm/utils/generation.py | 7 | |
| LOW | mamba_ssm/utils/generation.py | 7 | |
| LOW | mamba_ssm/utils/generation.py | 10 | |
| LOW | mamba_ssm/utils/generation.py | 11 | |
| LOW | mamba_ssm/utils/generation.py | 11 | |
| LOW | mamba_ssm/utils/generation.py | 13 | |
| LOW | mamba_ssm/utils/generation.py | 13 | |
| LOW | mamba_ssm/utils/generation.py | 13 | |
| LOW | mamba_ssm/utils/torch.py | 2 | |
| LOW | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 6 | |
| LOW | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 16 | |
| LOW | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 16 | |
| LOW | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 16 | |
| LOW | mamba_ssm/ops/triton/selective_state_update.py | 6 | |
| LOW | mamba_ssm/ops/triton/ssd_state_passing.py | 6 | |
| LOW | mamba_ssm/ops/triton/ssd_state_passing.py | 13 | |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 6 | |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 13 | |
| 42 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 62 | def get_cuda_bare_metal_version(cuda_dir): |
| LOW | tests/test_determinism.py | 194 | def test_combined_kernel_reproducible(case: str, d_has_hdim: bool, headdim: int, dstate: int): |
| LOW | tests/test_determinism.py | 202 | def test_kernel_close_to_default(case: str, headdim: int, dstate: int): |
| LOW | tests/test_determinism.py | 210 | def test_combined_kernel_close_to_default(case: str, d_has_hdim: bool, headdim: int, dstate: int): |
| LOW | tests/test_determinism.py | 215 | def test_default_mode_is_not_reproducible(): |
| LOW | tests/test_generation.py | 115 | def test_generation_varlen_with_padding(): |
| LOW | tests/ops/cute/test_mamba3_mimo_step.py | 55 | def _require_cuda_and_kernel_deps() -> None: |
| LOW | tests/ops/triton/test_selective_state_update.py | 22 | def test_selective_state_update(dim, dstate, has_z, itype): |
| LOW | tests/ops/triton/test_selective_state_update.py | 66 | def test_selective_state_update_with_heads(dim, dstate, ngroups, has_z, tie_hdim, itype): |
| LOW | tests/ops/triton/test_selective_state_update.py | 112 | def test_selective_state_update_with_batch_indices(dim, dstate, has_z, itype): |
| LOW | tests/ops/triton/test_selective_state_update.py | 161 | def test_selective_state_update_with_heads_with_batch_indices(dim, dstate, ngroups, has_z, tie_hdim, itype): |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 63 | def _require_cuda_and_kernel_deps() -> None: |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 590 | def apply_rotary_emb_rotate_half(tensor: Tensor, cos: Tensor, sin: Tensor) -> Tensor: |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 1265 | def test_mamba_mimo_smoke_forward_backward(mods: SimpleNamespace) -> None: |
| LOW | tests/ops/tilelang/test_mamba3_mimo.py | 1309 | def test_mamba_mimo_smoke_forward_backward_varlen(mods: SimpleNamespace) -> None: |
| LOW | mamba_ssm/distributed/distributed_utils.py | 120 | def allreduce_sequence_parallel_grad(model: torch.nn.Module, process_group: ProcessGroup): |
| LOW | mamba_ssm/utils/generation.py | 37 | def modify_logits_for_min_p_filtering(logits, min_p): |
| LOW | mamba_ssm/utils/generation.py | 45 | def modify_logits_for_top_k_filtering(logits, top_k): |
| LOW | mamba_ssm/utils/generation.py | 53 | def modify_logits_for_top_p_filtering(logits, top_p): |
| LOW | mamba_ssm/utils/generation.py | 69 | def modify_logit_for_repetition_penalty(logits, prev_output_tokens, repetition_penalty=1.0): |
| LOW | mamba_ssm/utils/determinism.py | 44 | def _filter_configs_by_block_sizes(configs): |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 195 | def _chunk_scan_fwd_kernel_wip( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 349 | def _chunk_scan_bwd_dz_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 449 | def _chunk_scan_bwd_dstates_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 530 | def _chunk_scan_bwd_dc_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 641 | def _chunk_scan_bwd_dx_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 774 | def _chunk_scan_bwd_dcb_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_state.py | 286 | def _chunk_state_bwd_dx_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_state.py | 398 | def _chunk_state_bwd_db_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_chunk_state.py | 640 | def _chunk_state_varlen_kernel( |
| LOW | mamba_ssm/ops/triton/selective_state_update.py | 24 | def _selective_scan_update_kernel( |
| LOW | mamba_ssm/ops/triton/selective_state_update.py | 224 | def selective_state_update_ref(state, x, dt, A, B, C, D=None, z=None, dt_bias=None, dt_softplus=False): |
| LOW | mamba_ssm/ops/triton/ssd_state_passing.py | 30 | def _state_passing_fwd_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_state_passing.py | 102 | def _state_passing_bwd_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 93 | def _chunk_scan_chunk_state_bwd_dx_kernel( |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 262 | def _chunk_scan_chunk_state_bwd_dx(x, dt, dA_cumsum, B, CB, dout, dstates, D=None, seq_idx=None, dx=None): |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 343 | def _mamba_chunk_scan_combined_fwd(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, initial_states=None, seq_id |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 396 | def _mamba_chunk_scan_combined_bwd(dout, x, dt, A, B, C, out, chunk_size, D=None, z=None, |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 624 | def mamba_chunk_scan_combined(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, initial_states=None, seq_idx=Non |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 682 | def ssd_chunk_scan_combined_ref(x, dt, A, B, C, chunk_size, D=None, z=None, dt_bias=None, dt_softplus=False): |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py | 16 | def rotary_qk_inference_kernel( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py | 151 | def apply_rotary_qk_inference_fwd( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py | 239 | def apply_rotary_qk_inference_reference( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py | 327 | def test_correctness_qk_inference(): |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1413 | def test_bwd_ddt_fused_correctness(): |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 72 | def bwd_dadt_cumsum_fused_kernel( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 369 | def dacs_segsum_kernel_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 610 | def compute_dacs_segsum_triton_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 691 | def compute_dacs_segsum_triton( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 852 | def compute_dacs_segsum_ref_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 907 | def bwd_dadt_fused_varlen_ref( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 959 | def compute_dtrap_ddt_varlen_ref( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1020 | def bwd_dadt_cumsum_fused_kernel_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1089 | def bwd_segsum_dadt_kernel_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1160 | def bwd_dtrap_ddt_kernel_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1255 | def _build_varlen_chunk_mapping(cu_seqlens: torch.Tensor, chunk_size: int): |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1311 | def bwd_dadt_fused_triton_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1367 | def bwd_dtrap_ddt_triton_varlen( |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1458 | def test_dtrap_ddt_correctness(): |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_utils.py | 1503 | def test_dacs_segsum_correctness_varlen(): |
| 12 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | mamba_ssm/ops/triton/layernorm_gated.py | 0 | if z is not none, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z)) |
| HIGH | mamba_ssm/ops/triton/layernorm_gated.py | 0 | if z is not none, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z)) |
| HIGH | mamba_ssm/ops/triton/layernorm_gated.py | 0 | if z is not none, we do norm(x) * silu(z) if norm_before_gate, else norm(x * silu(z)) |
| HIGH | mamba_ssm/ops/triton/mamba3/mamba3_siso_fwd.py | 0 | custom allocator for tma descriptor global memory allocation. |
| HIGH | mamba_ssm/ops/triton/mamba3/mamba3_siso_step.py | 0 | custom allocator for tma descriptor global memory allocation. |
| HIGH | mamba_ssm/ops/triton/mamba3/mamba3_siso_bwd.py | 0 | custom allocator for tma descriptor global memory allocation. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 279 | |
| LOW | tests/test_determinism.py | 85 | |
| LOW | mamba_ssm/utils/generation.py | 83 | |
| LOW | mamba_ssm/models/mixer_seq_simple.py | 86 | |
| LOW | mamba_ssm/ops/cute/mamba3/mamba3_step_fn.py | 227 | |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_mimo_rotary_step.py | 327 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py | 38 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py | 70 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py | 59 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py | 119 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py | 42 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py | 505 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py | 72 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd.py | 535 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py | 62 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py | 545 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py | 109 | |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_bwd_varlen.py | 591 | |
| LOW | mamba_ssm/modules/mha.py | 201 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 308 | Mamba-3 attention with Triton kernels and automatic differentiation. This is the main entry point for Mamba-3 forwa |
| HIGH | mamba_ssm/ops/triton/mamba3/mamba3_siso_fwd.py | 458 | Mamba-3 forward pass wrapper. Args: Q: Query tensor (batch, seqlen, nheads_qk, hea |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | csrc/selective_scan/static_switch.h | 1 | // Inspired by https://github.com/NVIDIA/DALI/blob/main/include/dali/core/static_switch.h |
| LOW | tests/ops/test_selective_scan.py | 241 | # assert torch.allclose(A.grad, A_ref.grad, rtol=rtolw, atol=atolw * 5) |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 261 | # cb = tl.load(cb_ptrs, mask=(offs_m[:, None] < chunk_size) & (offs_m[None, :] < chunk_size), other=0.0).to(tl.float |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 761 | # triton.Config({'BLOCK_SIZE_M': 32}, num_stages=3, num_warps=4), |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 1061 | # dout = tl.load(dout_ptrs, mask=(offs_m[:, None] < chunk_size_limit) & (offs_k[None, :] < hdim), other=0.0) |
| LOW | mamba_ssm/ops/triton/ssd_chunk_scan.py | 1141 | dA_cs_m = tl.load(dA_cumsum_ptr + offs_m * stride_dA_cs_csize, mask=offs_m < chunk_size, other=0.0).to(tl.float32) |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 481 | # Computing ddA with the dcb kernel is much slower, so we're not using it for now |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd.py | 221 | # --- Cache Diagonal qk_dot Path --- |
| LOW | mamba_ssm/ops/tilelang/mamba3/mamba3_mimo_fwd_varlen.py | 321 | # qk_dot_frag = T.alloc_fragment([chunk_size, R, R], dtype=accum_dtype) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 191 | # Step 1: Compute dZ and scale grad_out if Z gating is present |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 200 | # Step 2: Compute main gradients (dQ_mid, dK_mid, dV, dADT, dQK_dot, dD, dInput_SSM_State) |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 218 | # Step 3: Compute gradients through rotary embeddings and biases |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 235 | # Step 4: Compute dDT, dTrap, and input state gradients |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 247 | # Step 5: Compute gradients through angle_dt cumsum |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | mamba_ssm/distributed/tensor_parallel.py | 217 | # Create a mask of valid vocab ids (1 means it needs to be masked). |
| MEDIUM | mamba_ssm/models/mixer_seq_simple.py | 51 | # Create a copy of the config to modify |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | mamba_ssm/utils/hf.py | 20 | |
| MEDIUM | mamba_ssm/utils/hf.py | 22 | |
| MEDIUM | mamba_ssm/utils/hf.py | 23 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 80 | except Exception as e: |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 29 | except Exception: |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 79 | except Exception: |
| LOW | mamba_ssm/ops/triton/mamba3/mamba3_siso_combined.py | 165 | except Exception: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | mamba_ssm/ops/selective_scan_interface.py | 70 | # Here we just pass in None and dz will be allocated in the C++ code. |
| LOW | mamba_ssm/ops/triton/ssd_combined.py | 580 | # Here we just pass in None and dz will be allocated in the C++ code. |