MCPcopy Create free account

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

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

↓ 2 callersFunction_launch_add
(a: torch.Tensor, b: torch.Tensor)
fla/modules/backends/triton_ascend/causal_conv1d.py:216
↓ 2 callersFunction_launch_fwd_core
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, initial_state: torch.Tensor | Non
fla/modules/backends/triton_ascend/causal_conv1d.py:716
↓ 2 callersFunction_launch_silu
(y: torch.Tensor)
fla/modules/backends/triton_ascend/causal_conv1d.py:207
↓ 2 callersFunction_make_result_key
Identify a result row. Include any extra shape dims (e.g., AttnRes `L`) so per-op shape configs that share B/T/H/D but vary in extras don't collid
benchmarks/ops/run.py:355
↓ 2 callersFunction_new_cache
(cache_cls)
tests/models/test_cache.py:32
↓ 2 callersFunction_npu_block_size
(n_cols: int, n_rows: int)
fla/modules/backends/triton_ascend/fused_cross_entropy.py:147
↓ 2 callersFunction_npu_chunk_size
(T: int, BT: int)
fla/modules/backends/triton_ascend/causal_conv1d.py:21
↓ 2 callersFunction_npu_vocab_block_size
(vocab_size: int, num_rows: int)
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:160
↓ 2 callersMethod_project_and_split
(self, hidden_states: torch.Tensor)
fla/layers/mamba3.py:187
↓ 2 callersFunction_public_api_contract
()
tests/test_split_package_release.py:90
↓ 2 callersFunction_raw_chunk_gated_delta_rule_fwd_h
( k: torch.Tensor, w: torch.Tensor, u: torch.Tensor, g: torch.Tensor | None = None, gk: to
fla/ops/common/intracard_cp.py:81
↓ 2 callersFunction_ref_varlen
(q, r, k, v, cu_seqlens, window_size=None)
tests/ops/test_parallax.py:19
↓ 2 callersFunction_repeat_kv_for_gpt_oss
(hidden_states: torch.Tensor, n_rep: int)
tests/ops/test_attn_sink.py:20
↓ 2 callersFunction_requires_by_name
(wheel: Path)
tests/test_split_package_release.py:75
↓ 2 callersFunction_requires_dist_entries
(wheel: Path)
tests/test_split_package_release.py:82
↓ 2 callersFunction_segmented_arange
Expand per-segment counts into flat per-slot index tensors. Given segment sizes ``counts = [c0, c1, ...]``, return two 1-D tensors of length
fla/ops/utils/index.py:113
↓ 2 callersFunction_select_last_query_hidden_states
( hidden_states: torch.Tensor, attention_mask: torch.Tensor | None, )
fla/models/yoco/modeling_yoco.py:42
↓ 2 callersFunction_skip_contiguous
( no_guard_contiguous: bool | list[str] | tuple[str, ...] | set[str], param_name: str, skip_params
fla/utils/_decorators.py:83
↓ 2 callersFunction_suffix
(git_label)
benchmarks/ops/run.py:379
↓ 2 callersMethod_to_causal_conv_layout
(self, hidden_states: torch.Tensor)
fla/layers/mamba.py:163
↓ 2 callersFunction_truncate
Truncate *s* to *max_len* chars, adding ``...`` if needed.
scripts/run_benchmark_compare.py:204
↓ 2 callersFunction_wheel_names
(wheel: Path)
tests/test_split_package_release.py:70
↓ 2 callersFunctiona2a
(x, stage=1, group=None, async_op=False)
benchmarks/cp/test_gdn_with_cp.py:87
↓ 2 callersFunctionalign_multiple
(value, multiple_size=8)
fla/layers/rodimus.py:50
↓ 2 callersFunctionbuild_split_packages
Build split packages with proper dependency management.
scripts/build_packages.py:100
↓ 2 callersFunctioncausal_conv1d_bwd
( x: torch.Tensor, dy: torch.Tensor, dht: torch.Tensor, weight: torch.Tensor | None = None,
fla/modules/conv/triton/ops.py:145
↓ 2 callersFunctioncausal_conv1d_update_states
( x: torch.Tensor, state_len: int, initial_state: torch.Tensor | None = None, cu_seqlens: torc
fla/modules/conv/triton/ops.py:249
↓ 2 callersFunctioncausal_conv1d_update_states_npu
( x: torch.Tensor, state_len: int, initial_state: torch.Tensor | None = None, cu_seqlens: torc
fla/modules/backends/triton_ascend/causal_conv1d.py:992
↓ 2 callersFunctionchunk_comba_cumsum_scalar_fwd
( g: torch.Tensor, chunk_size: int, cu_seqlens: torch.Tensor | None = None, output_dtype: torc
fla/ops/comba/utils.py:65
↓ 2 callersFunctionchunk_delta_rule_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, A: torch.Tensor,
fla/ops/delta_rule/chunk.py:61
↓ 2 callersFunctionchunk_dplr_fwd_h
( kg: torch.Tensor, v: torch.Tensor, w: torch.Tensor, u: torch.Tensor, bg: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/chunk_h_fwd.py:112
↓ 2 callersFunctionchunk_dplr_fwd_intra
( q: torch.Tensor, k: torch.Tensor, a: torch.Tensor, b: torch.Tensor, gi: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/chunk_A_fwd.py:311
↓ 2 callersFunctionchunk_gated_delta_rule_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/gated_delta_rule/chunk.py:120
↓ 2 callersFunctionchunk_gla_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, g_cumsum: torch.Tens
fla/ops/gla/chunk.py:1157
↓ 2 callersFunctionchunk_gla_bwd_dA
( v: torch.Tensor, do: torch.Tensor, scale: float, cu_seqlens: torch.LongTensor | None = None,
fla/ops/gla/chunk.py:926
↓ 2 callersFunctionchunk_gla_bwd_dv
( k: torch.Tensor, g: torch.Tensor, A: torch.Tensor, do: torch.Tensor, dh: torch.Tensor,
fla/ops/gla/chunk.py:960
↓ 2 callersFunctionchunk_gla_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, g_cumsum: torch.Tens
fla/ops/gla/chunk.py:1095
↓ 2 callersFunctionchunk_hgrn
( x: torch.Tensor, g: torch.Tensor, initial_state: torch.Tensor = None, output_final_state: bo
fla/ops/hgrn/chunk.py:281
↓ 2 callersFunctionchunk_kda_bwd_dAv
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, do: torch.Tensor, A: torch.Tensor | N
fla/ops/kda/chunk_bwd.py:299
↓ 2 callersFunctionchunk_mesa_fwd_h
( k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor, h_init: torch.Ten
fla/ops/mesa_net/chunk_h_fwd.py:120
↓ 2 callersFunctionchunk_oja_fwd_h
( v: torch.Tensor, w: torch.Tensor, u: torch.Tensor, gv: torch.Tensor | None = None, initi
fla/ops/gated_oja_rule/chunk_h.py:200
↓ 2 callersFunctionchunk_titans_linear_ref
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/titans/naive.py:308
↓ 2 callersFunctionchunk_ttt_linear
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/ttt/chunk.py:1377
↓ 2 callersFunctionchunk_update_once
( b_p, b_k, b_v, b_m, b_g_exp_q, b_h, b_lamb, )
fla/ops/mesa_net/chunk_cg_solver_fwd.py:17
↓ 2 callersFunctioncleanup_distributed
Clean up distributed environment.
tests/context_parallel/test_cp_token_shift.py:63
↓ 2 callersFunctioncleanup_distributed
Clean up distributed environment.
tests/context_parallel/test_cp_dplr.py:68
↓ 2 callersFunctioncleanup_distributed
Clean up distributed environment.
tests/context_parallel/test_cp_conv.py:82
↓ 2 callersFunctioncleanup_distributed
Clean up distributed environment.
tests/context_parallel/test_cp_kda.py:97
↓ 2 callersFunctioncleanup_distributed
Clean up distributed environment.
tests/context_parallel/test_cp_gdn.py:94
↓ 2 callersFunctioncompute_dh0_npu
( dy: torch.Tensor, y: torch.Tensor | None, weight: torch.Tensor, initial_state: torch.Tensor,
fla/modules/backends/triton_ascend/causal_conv1d.py:944
↓ 2 callersFunctionconstruct_binary_level_mask
(level, T)
fla/ops/log_linear_attn/chunk.py:1454
↓ 2 callersFunctionconv_cp_send_recv_bwd
Conv1d CP backward: each rank sends d_initial_state, receives from next rank. The received gradient should be added to the last W-1 tokens'
fla/ops/cp/comm.py:156
↓ 2 callersFunctioncreate_pyproject_toml
Create pyproject.toml for a package.
scripts/build_packages.py:47
↓ 2 callersFunctionelu_p1
(x)
fla/layers/delta_net.py:28
↓ 2 callersFunctionfast_causal_conv1d_fn
x: (batch, seqlen, dim) weight: (dim, width) bias: (dim,) seq_idx: (batch, seqlen) initial_states: (batch, dim, width - 1) fi
fla/modules/conv/cuda/ops.py:147
↓ 2 callersFunctionfft_conv
(u, k, dropout_mask, gelu=True, k_rev=None)
fla/modules/conv/long_conv.py:16
↓ 2 callersFunctionflatten_diag_outer_product
(x, y)
fla/modules/feature_map.py:22
↓ 2 callersFunctionflatten_diag_outer_product_off1
(x, y)
fla/modules/feature_map.py:30
↓ 2 callersMethodforward
( self, hidden_states: torch.Tensor, attention_mask: torch.LongTensor | None = None,
fla/layers/yoco.py:135
↓ 2 callersFunctionfused_addcmul_rwkv7
( hidden_states: torch.Tensor, delta: torch.Tensor, xr: torch.Tensor, xw: torch.Tensor, xk
fla/ops/rwkv7/fused_addcmul.py:274
↓ 2 callersFunctionfused_beta_sigmoid
(x: torch.Tensor, scale: float = 1.0)
fla/ops/common/gate.py:106
↓ 2 callersFunctionfused_k_rwkv7
(k, a, ka, cu_seqlens=None, cu_seqlens_cpu=None)
fla/ops/rwkv7/fused_k_update.py:353
↓ 2 callersFunctionfused_kda_gate
Fused KDA gate computation with autograd support. Computes: g = -A_log.exp().unsqueeze(-1) * softplus(g + dt_bias.view(g.shape[-2:])) A
fla/ops/kda/gate.py:321
↓ 2 callersFunctionfused_mul_recurrent_rwkv7
r""" This function computes the recurrence S_t = S_t @ (I + a_t b_t^T) + v_t k_t^T in a recurrent manner. Args: r (torch.Tensor):
fla/ops/rwkv7/fused_recurrent.py:240
↓ 2 callersFunctionfused_recurrent
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor | None = None, g_gamm
fla/ops/common/fused_recurrent.py:621
↓ 2 callersFunctionfused_recurrent_comba
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/comba/fused_recurrent.py:223
↓ 2 callersFunctionfused_recurrent_kda_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
fla/ops/kda/fused_recurrent.py:234
↓ 2 callersFunctiongate_output_correction
Apply the RWKV7 output correction and output gate. Computes ``(o + correction) * g``, where ``correction = ((r * k * r_k).sum(-1, keepdi
fla/ops/rwkv7/gate_output_correction.py:253
↓ 2 callersFunctiongdn_gate_bwd
( g: torch.Tensor, A_log: torch.Tensor, dt_bias: torch.Tensor | None, dyg: torch.Tensor, )
fla/ops/gated_delta_rule/gate.py:190
↓ 2 callersFunctiongdn_with_a2a
()
benchmarks/cp/test_gdn_with_cp.py:728
↓ 2 callersFunctiongenerate_cu_seqlens
(end=8192, mean=2048, var=512)
benchmarks/cp/test_gdn_with_cp.py:197
↓ 2 callersFunctiongenerate_inputs
Create input tensors for *config* at the given shape. Returns a dict mapping parameter names to tensors. Raises ValueError if dim_constraints
benchmarks/ops/registry.py:199
↓ 2 callersFunctionget_block_size_c
(chans: int)
fla/ops/rwkv4/fused_recurrent.py:20
↓ 2 callersFunctionget_commit_sha
(ref: str)
scripts/run_benchmark_compare.py:70
↓ 2 callersFunctionget_fla_config_dir
Get FLA's configs directory. The directory can be overridden by setting the FLA_CONFIG_DIR environment variable. If set, configs will be load
fla/ops/utils/cache.py:99
↓ 2 callersFunctionget_gpu_info
Get GPU model information. This function detects the GPU model and returns a sanitized string identifier. It prioritizes FLA_GPU_NAME environ
fla/ops/utils/cache.py:73
↓ 2 callersFunctionget_op
(name: str)
benchmarks/ops/registry.py:170
↓ 2 callersFunctionget_ref_grad
(*tensors)
benchmarks/cp/test_gdn_with_cp.py:176
↓ 2 callersFunctionget_triton_cache_dir
Get Triton's cache directory via Triton's internal API.
scripts/utils/autotune_generate.py:12
↓ 2 callersFunctioninstall_wheel
(python: Path, wheel: Path, *, with_deps: bool)
scripts/smoke_test_split_packages.py:135
↓ 2 callersMethodis_numeric
(value: Any)
fla/ops/utils/cache.py:138
↓ 2 callersFunctionk_update_ref
(k: torch.Tensor, a: torch.Tensor, ka: torch.Tensor)
fla/ops/rwkv7/fused_k_update.py:18
↓ 2 callersFunctionkernel
( q: T.Tensor(q_s, _dtype), k: T.Tensor(kv_s, _dtype), v: T.Tensor(vv_s, _dtype), g: T
fla/ops/common/backends/tilelang/parallel_attn_bwd.py:201
↓ 2 callersFunctionkernel
( q: T.Tensor(qk_s, _dtype), k: T.Tensor(qk_s, _dtype), v: T.Tensor(v_s, _dtype), g: T
fla/ops/common/backends/tilelang/chunk_bwd.py:252
↓ 2 callersFunctionkernel
( q: T.Tensor(q_s, _dtype), k: T.Tensor(kv_s, _dtype), v: T.Tensor(vv_s, _dtype), g: T
fla/ops/common/backends/tilelang/parallel_attn_fwd.py:210
↓ 2 callersFunctionkernel
( q: T.Tensor(qk_s, _dtype), k: T.Tensor(qk_s, _dtype), v: T.Tensor(v_s, _dtype), v_ne
fla/ops/kda/backends/tilelang/chunk_bwd_dqkg.py:366
↓ 2 callersFunctionkernel_body
(q, k, v, g, lse, delta, do, dq_out, dk_out, dv_out, dg, i_b, i_h, i_t, t_s, T_seq, bos)
fla/ops/common/backends/tilelang/parallel_attn_bwd.py:60
↓ 2 callersFunctionkernel_body
(q, k, v, g, h, do, dh, dq, dk, dw, dv, dg, scale, i_b, i_h, i_k, t_s, T_seq, i_t_local, h
fla/ops/common/backends/tilelang/chunk_bwd.py:68
↓ 2 callersFunctionkernel_body
(q, k, v, g, sink_bias, o, lse, i_b, i_h, i_t, t_s, T_seq, bos)
fla/ops/common/backends/tilelang/parallel_attn_fwd.py:86
↓ 2 callersFunctionkernel_body
(q, k, v, v_new, g, beta, A, h, do, dh, dq, dk, dv, dv2, dg, db, dA, scale, i_b, i_h, t_s,
fla/ops/kda/backends/tilelang/chunk_bwd_dqkg.py:70
↓ 2 callersFunctionlayer_norm_bwd
( dy: torch.Tensor, x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, mean: torch
fla/modules/layernorm.py:627
↓ 2 callersFunctionlayer_norm_fwd
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, eps: float = 1e-5, residual:
fla/modules/layernorm.py:543
↓ 2 callersFunctionlayer_norm_gated_bwd
( dy: torch.Tensor, x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor, bias: torch.Te
fla/modules/fused_norm_gate.py:527
↓ 2 callersFunctionlayer_norm_gated_fwd
( x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, activation:
fla/modules/fused_norm_gate.py:443
↓ 2 callersFunctionlist_ops
()
benchmarks/ops/registry.py:176
↓ 2 callersFunctionlogsumexp_fwd_npu
( x, scale: float | None = None, softcapping: float | None = None, dtype: torch.dtype | None =
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:169
↓ 2 callersMethodlookup_exact
(self, key: AutotuneKey)
fla/ops/utils/cache.py:240
↓ 2 callersFunctionmake_key
(r)
scripts/run_benchmark_compare.py:220
↓ 2 callersFunctionmesa_net_decoding_one_step
Triton implementation of Mesa Net CG one step Args: q (torch.Tensor): query tensor [B, H, K] k (torch.Tensor):
fla/ops/mesa_net/decoding_one_step.py:104
↓ 2 callersFunctionnaive_deltaformer_attn
Naive reference implementation of DeltaFormer attention for sequence-first format. Args: q: [B, T, H, D] k: [B, T, H, D]
fla/ops/deltaformer/naive.py:113
← previousnext →301–400 of 2,989, ranked by callers