MCPcopy Create free account

hub / github.com/fla-org/flash-linear-attention / functions

Functions2,989 in github.com/fla-org/flash-linear-attention

↓ 1 callersFunction_import_op
Dynamically import the op function from the installed fla package.
benchmarks/ops/run.py:155
↓ 1 callersFunction_is_inner_contiguous
(x: torch.Tensor)
fla/modules/backends/triton_ascend/activations.py:29
↓ 1 callersFunction_launch_silu_bwd
(y_pre: torch.Tensor, dy: torch.Tensor)
fla/modules/backends/triton_ascend/causal_conv1d.py:263
↓ 1 callersFunction_make_col_headers
Build equal-width column headers like ``main [abc1234](ms)``. Both branch names are truncated to 8 chars (with ``...``), then right-padded
benchmarks/ops/run.py:370
↓ 1 callersFunction_npu_bwd_tile_config
( T: int, BT: int, D: int, dtype: torch.dtype, initial_state: torch.Tensor | None, )
fla/modules/backends/triton_ascend/causal_conv1d.py:59
↓ 1 callersFunction_npu_vocab_block_size
(vocab_size: int, num_rows: int)
fla/modules/backends/triton_ascend/fused_kl_div.py:94
↓ 1 callersFunction_npu_vocab_block_size
(vocab_size: int, num_rows: int)
fla/modules/backends/triton_ascend/grpo.py:20
↓ 1 callersFunction_ops_subdirs_from_flapy_imports
(relpath: str)
scripts/run_benchmark_compare.py:79
↓ 1 callersFunction_packed_cu_seqlens
(total_tokens: int, doc_len: int)
tests/modules/test_token_shift.py:143
↓ 1 callersFunction_parallel_based_bwd_dkv
( i_bh, i_c, i_k, i_v, q, k, v, do, dz, dk, dv, scale, T,
fla/ops/based/parallel.py:188
↓ 1 callersFunction_parallel_based_bwd_dq
( i_bh, i_c, i_k, i_v, q, k, v, do, dz, dq, scale, T, B: t
fla/ops/based/parallel.py:105
↓ 1 callersFunction_parallel_rebased_bwd_dkv
( i_bh, i_c, i_k, i_v, i_h, q, k, v, do, dz, dk, dv, scale
fla/ops/rebased/parallel.py:188
↓ 1 callersFunction_parallel_rebased_bwd_dq
( i_bh, i_c, i_k, i_v, i_h, q, k, v, do, dz, dq, scale, T,
fla/ops/rebased/parallel.py:104
↓ 1 callersFunction_pick_tile
Return (BT, BS, num_warps) tuned for head dim.
fla/ops/common/backends/tilelang/parallel_attn_fwd.py:24
↓ 1 callersFunction_postprocess_fwd
( y: torch.Tensor, residual: torch.Tensor | None, activation: str | None, )
fla/modules/backends/triton_ascend/causal_conv1d.py:283
↓ 1 callersFunction_postprocess_update
( y: torch.Tensor, residual: torch.Tensor | None, activation: str | None, )
fla/modules/backends/triton_ascend/causal_conv1d.py:702
↓ 1 callersFunction_precompute_intracard_indices
Pre-compute all derived indices using pure Python loops. Returns: cu_seqlens_split_values: flattened cu_seqlens boundaries for split seqs
fla/ops/common/intracard_cp.py:362
↓ 1 callersMethod_prepare_cache_for_cp
Prepare cache for CP forward pass by communicating with previous rank. Args: x: Input tensor of shape [1, T, D] cu_se
fla/modules/token_shift_cp.py:40
↓ 1 callersMethod_prepare_initial_state_for_cp
Prepare initial_state for CP forward pass by communicating with previous rank. Args: x: Input tensor of shape [1, T, D]
fla/modules/conv/cp/ops.py:29
↓ 1 callersMethod_prepare_tensors
(self)
scripts/utils/autotune_generate.py:34
↓ 1 callersMethod_preprocess_step
(self, dd_A, dd_dt, B, C, x, z, trap_proj, angle_proj)
fla/layers/mamba3.py:313
↓ 1 callersMethod_print_dependency_chain
(self, symbol, module, symbol_chain_map)
scripts/find_dependent_tests.py:193
↓ 1 callersFunction_print_run_header
(rows: dict)
benchmarks/benchmark_training_throughput.py:52
↓ 1 callersFunction_raw_legacy_cache
()
tests/models/test_cache.py:39
↓ 1 callersFunction_register_aliases
()
fla/utils/__init__.py:63
↓ 1 callersMethod_rescale_new_keys
``k_tilde[i] = k[i] * exp2(R_{c(i)} - P[i])`` for the new tokens only.
fla/layers/wall_attn.py:280
↓ 1 callersFunction_split_for_passing
( x: torch.Tensor, cu_seqlens, split_at: int = 1, )
tests/modules/test_token_shift.py:59
↓ 1 callersMethod_step_mimo_projections
(self, x_dtype: torch.dtype, z_dtype: torch.dtype)
fla/layers/mamba3.py:329
↓ 1 callersFunction_upad_input
Unpads query, key, and values tensors, using a single dimension for all tokens even though they belong to different batches. This functi
fla/layers/mom.py:29
↓ 1 callersMethod_update_active_backend
Update active backend based on priority.
fla/ops/backends/__init__.py:127
↓ 1 callersFunction_use_seq_bwd
( T: int, dtype: torch.dtype, initial_state: torch.Tensor | None, dht: torch.Tensor | None,
fla/modules/backends/triton_ascend/causal_conv1d.py:297
↓ 1 callersFunction_warmup_autotune
Run *fn* multiple times so triton autotuning is fully cached.
benchmarks/ops/run.py:223
↓ 1 callersFunction_warmup_iters
Extra per-shape forward+backward iterations before timing (not Triton do_bench warmup).
benchmarks/ops/run.py:211
↓ 1 callersFunctionactivation_quant
Per-token quantization to 8 bits. No grouping is needed for quantization. Args: x: An activation tensor with shape [n, d]. Retu
fla/modules/fused_bitlinear.py:30
↓ 1 callersFunctionaddcmul_bwd1
(d_xr, d_xw, d_xk, d_xv, d_xa, d_xg, x_r, x_w, x_k, x_v, x_a, x_g, hidden_states, delta, use_
fla/ops/rwkv7/fused_addcmul.py:175
↓ 1 callersFunctionaddcmul_bwd2
(d_oxr, d_xw, d_xk, d_xv, d_xa, d_xg, delta, use_xg: bool)
fla/ops/rwkv7/fused_addcmul.py:210
↓ 1 callersFunctionassert_core_only_import
(python: Path, version: str)
scripts/smoke_test_split_packages.py:56
↓ 1 callersFunctionassert_full_import
(python: Path, version: str)
scripts/smoke_test_split_packages.py:80
↓ 1 callersFunctionassert_split_namespace_installed
(python: Path)
scripts/smoke_test_split_packages.py:106
↓ 1 callersMethodbatchify
Split dataset into batches of exactly block_size length
evals/ppl.py:53
↓ 1 callersFunctionbenchmark_op
Benchmark a single op across all *shapes* and *modes*. Returns a list of result dicts (one per shape x mode).
benchmarks/ops/run.py:232
↓ 1 callersFunctionbias_gelu
(y, bias)
fla/modules/activations.py:453
↓ 1 callersFunctionbias_gelu_bwd
Assume that y has shape (B, D=D) and bias has shape (D)
fla/modules/activations.py:462
↓ 1 callersFunctionbroadcast
(x, group=None)
benchmarks/cp/test_gdn_with_cp.py:186
↓ 1 callersMethodbuild
( cls, arg_names: list[str], key_names: list[str], positional_args: tuple[Any,
fla/ops/utils/cache.py:159
↓ 1 callersFunctionbuild_packages
Build wheels and source distributions for both packages.
scripts/build_packages.py:213
↓ 1 callersFunctioncache_disabled
()
fla/utils/_decorators.py:60
↓ 1 callersFunctioncal_G
(beta, n, seq_len)
fla/ops/titans/naive.py:53
↓ 1 callersFunctioncal_G_log
calculate G_{i,j} log(G_{i,j}) = log(sum_{k=j}^i exp(log(β_i/β_k) + log(n_{k,j})))
fla/ops/titans/log_impl.py:64
↓ 1 callersFunctioncal_f
(beta, seq_len, m)
fla/ops/titans/naive.py:46
↓ 1 callersFunctioncal_f_log
cal_f_log(log_beta, seq_len, log_m) -> f log(f_t) = log(sum_{i=1}^t exp(sum_{k=i+1}^t log(1-α_k) + sum_{k=1}^i log(η_k)))
fla/ops/titans/log_impl.py:32
↓ 1 callersFunctioncal_n
(theta, eta, seq_len)
fla/ops/titans/naive.py:14
↓ 1 callersFunctioncal_n_log
calculate n_{i,j} in log space log(n_{i,j}) = log(θ_j) + sum_{k=j+1}^i log(η_k)
fla/ops/titans/log_impl.py:11
↓ 1 callersMethodcan_use
(cls)
fla/ops/backends/__init__.py:74
↓ 1 callersFunctioncategorize_dependencies
Split base deps: einops travels with the kernels, everything else with layers/models.
scripts/build_packages.py:33
↓ 1 callersFunctioncausal_conv1d_bwd_npu
( x: torch.Tensor, dy: torch.Tensor, dht: torch.Tensor, weight: torch.Tensor | None = None,
fla/modules/backends/triton_ascend/causal_conv1d.py:810
↓ 1 callersFunctioncausal_conv1d_cp
Context Parallel version of causal_conv1d. Automatically handles communication in CP environment: - Forward: get initial_state from prev
fla/modules/conv/cp/ops.py:218
↓ 1 callersFunctioncausal_conv1d_cuda
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor | None = None, residual: torch.Ten
fla/modules/conv/cuda/ops.py:187
↓ 1 callersFunctioncausal_conv1d_fwd_npu
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor, initi
fla/modules/backends/triton_ascend/causal_conv1d.py:769
↓ 1 callersFunctioncausal_conv1d_update_npu
( x: torch.Tensor, cache: torch.Tensor, residual: torch.Tensor | None = None, weight: torch.Te
fla/modules/backends/triton_ascend/causal_conv1d.py:1041
↓ 1 callersFunctioncausal_conv1d_update_ref_torch
x: (batch, dim) or (batch, dim, seqlen) conv_state: (batch, dim, state_len), where state_len >= width - 1 weight: (dim, width) bias:
tests/modules/test_conv.py:76
↓ 1 callersFunctionceil_log
(x: int, b: int)
fla/layers/log_linear_mamba2.py:30
↓ 1 callersFunctionchannel_mixing_rwkv7
(x: torch.Tensor, x_prev: torch.Tensor, x_k: torch.Tensor, key_weight: torch.Tensor,
fla/ops/rwkv7/channel_mixing.py:328
↓ 1 callersFunctionchannel_mixing_rwkv7_torch
(x, x_prev, x_k, key_weight, value_weight)
fla/ops/rwkv7/channel_mixing.py:335
↓ 1 callersFunctioncheck_environments
Checks the current operating system, Triton version, and Python version, issuing warnings if they don't meet recommendations. This functi
fla/utils/_device.py:26
↓ 1 callersFunctioncheck_gpu_memory
()
scripts/check_gpu.py:56
↓ 1 callersFunctioncheck_or_fix
(root: Path, fix: bool, end_year: int)
scripts/check_header.py:71
↓ 1 callersFunctionchunk
(x)
fla/ops/gdn2/naive.py:126
↓ 1 callersFunctionchunk_abc
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/abc/chunk.py:1081
↓ 1 callersFunctionchunk_bwd_dqkwg_tilelang
( q, k, v, do, h, dh, w=None, g=None, g_gamma=None, dv=None, scale
fla/ops/common/backends/tilelang/chunk_bwd.py:297
↓ 1 callersFunctionchunk_bwd_dv
( q: torch.Tensor, k: torch.Tensor, do: torch.Tensor, dh: torch.Tensor, g: torch.Tensor |
fla/ops/common/chunk_o.py:550
↓ 1 callersFunctionchunk_comba_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, p: torch.Tensor, g0: torch.Tensor,
fla/ops/comba/chunk.py:89
↓ 1 callersFunctionchunk_comba_cumsum_scalar_bwd
( dg0: torch.Tensor, chunk_size: int, cu_seqlens: torch.Tensor | None = None, output_dtype: to
fla/ops/comba/utils.py:145
↓ 1 callersFunctionchunk_comba_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, p: torch.Tensor, g: torch.Tensor,
fla/ops/comba/chunk.py:20
↓ 1 callersFunctionchunk_cumprod_householder_bwd_fn
( w1: torch.Tensor, w2: torch.Tensor, hc_suffix: torch.Tensor, dhc_whole: torch.Tensor, k:
fla/ops/path_attn/cumprod_householder_bwd.py:104
↓ 1 callersFunctionchunk_cumprod_householder_fwd_fn
( k: torch.Tensor, w1: torch.Tensor, w2: torch.Tensor, S: int, # split size, aka large chunk
fla/ops/path_attn/cumprod_householder_fwd.py:89
↓ 1 callersFunctionchunk_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, scale: float,
fla/ops/delta_rule/chunk.py:18
↓ 1 callersFunctionchunk_dplr_bwd_dAu
( v: torch.Tensor, v_new: torch.Tensor, do: torch.Tensor, A_qb: torch.Tensor, scale: float
fla/ops/generalized_delta_rule/dplr/chunk_o_bwd.py:397
↓ 1 callersFunctionchunk_dplr_bwd_dhu
( qg: torch.Tensor, bg: torch.Tensor, w: torch.Tensor, gk: torch.Tensor, h0: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/chunk_h_bwd.py:113
↓ 1 callersFunctionchunk_dplr_bwd_dqk_intra
( q: torch.Tensor, k: torch.Tensor, a: torch.Tensor, b: torch.Tensor, gi: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/chunk_A_bwd.py:456
↓ 1 callersFunctionchunk_dplr_bwd_dv
( A_qk: torch.Tensor, kg: torch.Tensor, do: torch.Tensor, dh: torch.Tensor, cu_seqlens: to
fla/ops/generalized_delta_rule/dplr/chunk_o_bwd.py:297
↓ 1 callersFunctionchunk_dplr_bwd_o
( k: torch.Tensor, b: torch.Tensor, v: torch.Tensor, v_new: torch.Tensor, gk: torch.Tensor
fla/ops/generalized_delta_rule/dplr/chunk_o_bwd.py:333
↓ 1 callersFunctionchunk_dplr_bwd_wy
( A_ab_inv: torch.Tensor, A_ak: torch.Tensor, v: torch.Tensor, ag: torch.Tensor, dw: torch
fla/ops/generalized_delta_rule/dplr/wy_fast_bwd.py:120
↓ 1 callersFunctionchunk_dplr_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Tensor, b: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/chunk.py:33
↓ 1 callersFunctionchunk_dplr_fwd_o
( qg: torch.Tensor, v: torch.Tensor, v_new: torch.Tensor, A_qk: torch.Tensor, A_qb: torch.
fla/ops/generalized_delta_rule/dplr/chunk_o_fwd.py:94
↓ 1 callersFunctionchunk_fwd_mesa_net_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/mesa_net/chunk.py:74
↓ 1 callersFunctionchunk_fwd_mesa_net_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/mesa_net/chunk.py:22
↓ 1 callersFunctionchunk_gated_delta_product_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/gated_delta_product/chunk.py:25
↓ 1 callersFunctionchunk_gated_delta_product_fwd_h
( k: torch.Tensor, w: torch.Tensor, u: torch.Tensor, g: torch.Tensor | None = None, initia
fla/ops/gated_delta_product/chunk_deltaproduct_h.py:406
↓ 1 callersFunctionchunk_gated_delta_product_fwd_o
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, h: torch.Tensor, g: torch.Tensor | No
fla/ops/gated_delta_product/chunk_deltaproduct_o.py:122
↓ 1 callersFunctionchunk_gated_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/gated_delta_rule/chunk.py:32
↓ 1 callersFunctionchunk_gated_delta_rule_fwd_intra
r""" GDN intra-chunk forward: fused kkt + solve_tril + recompute_w_u. Equivalent to: A = chunk_scaled_dot_kkt_fwd(k, g, beta, ...)
fla/ops/gated_delta_rule/chunk_fwd.py:317
↓ 1 callersFunctionchunk_gdn2_bwd
End-to-end GDN-2 backward. Returns (dq, dk, dv, db, dw, dg, dh0, dA_log, dt_bias_grad). ``db`` has shape [B, T, H, K] (channel-wise erase gat
fla/ops/gdn2/chunk_bwd.py:312
↓ 1 callersFunctionchunk_gdn2_bwd_intra
Intra-chunk backward: q, k, g, b contributions from dAqk, dAkk. Adds the intra-chunk piece of db (channel-wise, K-dim) to the running ``db``
fla/ops/gdn2/chunk_intra.py:773
↓ 1 callersFunctionchunk_gdn2_bwd_wy_dqkg_fused
Fused WY backward producing dq, dk, dv, db (K-dim), dw (V-dim), dg, dA.
fla/ops/gdn2/chunk_bwd.py:242
↓ 1 callersFunctionchunk_gdn2_fwd
Top-level GDN-2 forward pipeline. The pipeline is: 1. Compute the base-2 log-decay cumsum within each chunk (``kda_gate_chunk_cums
fla/ops/gdn2/chunk_fwd.py:20
↓ 1 callersFunctionchunk_gdn2_fwd_intra
Intra-chunk forward: build Aqk, Akk_inv, and the WY auxiliaries (w, u).
fla/ops/gdn2/chunk_intra.py:676
↓ 1 callersFunctionchunk_gdn2_fwd_intra_token_parallel
Token-parallel diagonal kernel: builds Aqk plus diagonal Akk in fp32.
fla/ops/gdn2/chunk_intra_token_parallel.py:135
↓ 1 callersFunctionchunk_generalized_iplr_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Tensor, b: torch.Tensor,
fla/ops/generalized_delta_rule/iplr/chunk.py:329
↓ 1 callersFunctionchunk_generalized_iplr_delta_rule_fwd_h
( k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, u: torch.Tensor, b: torch.Tensor,
fla/ops/generalized_delta_rule/iplr/chunk.py:256
← previousnext →501–600 of 2,989, ranked by callers