MCPcopy Create free account

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

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

↓ 1 callersFunctionfused_attnres_bwd
( do: torch.Tensor, q: torch.Tensor, residuals: Sequence[torch.Tensor], res: tuple[torch.Tenso
fla/ops/attnres/fused.py:362
↓ 1 callersFunctionfused_attnres_fwd
( q: torch.Tensor, residuals: Sequence[torch.Tensor], res: tuple[torch.Tensor, ...], w: torch.
fla/ops/attnres/fused.py:310
↓ 1 callersFunctionfused_beta_sigmoid_fwd
(x: torch.Tensor, scale: float = 1.0)
fla/ops/common/gate.py:56
↓ 1 callersFunctionfused_chunk
r""" Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys of shape `[B, T, H, K
fla/ops/common/fused_chunk.py:590
↓ 1 callersFunctionfused_chunk_based
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, scale: float | None = None, use_norm:
fla/ops/based/fused_chunk.py:357
↓ 1 callersFunctionfused_chunk_bwd
( q, k, v, g, g_gamma, do, scale, initial_state: torch.Tensor, dht: torch.
fla/ops/common/fused_chunk.py:458
↓ 1 callersFunctionfused_chunk_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor | None = None, g_gamm
fla/ops/common/fused_chunk.py:413
↓ 1 callersFunctionfused_chunk_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/fused_chunk.py:732
↓ 1 callersFunctionfused_chunk_ttt_linear_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/ttt/fused_chunk.py:608
↓ 1 callersFunctionfused_chunk_ttt_linear_bwd_dh
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, v2: torch.Tensor, x: torch.Tensor,
fla/ops/ttt/fused_chunk.py:484
↓ 1 callersFunctionfused_chunk_ttt_linear_bwd_h
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/ttt/fused_chunk.py:426
↓ 1 callersFunctionfused_chunk_ttt_linear_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/ttt/fused_chunk.py:557
↓ 1 callersFunctionfused_cross_entropy_backward_npu
( dlogits: torch.Tensor, grad_losses: torch.Tensor, logits: torch.Tensor, lse: torch.Tensor,
fla/modules/backends/triton_ascend/fused_cross_entropy.py:235
↓ 1 callersFunctionfused_cross_entropy_forward
( logits: torch.Tensor, target: torch.Tensor, label_smoothing: float = 0.0, logit_scale: float
fla/modules/fused_cross_entropy.py:160
↓ 1 callersFunctionfused_cross_entropy_forward_npu
( logits: torch.Tensor, target: torch.Tensor, label_smoothing: float = 0.0, logit_scale: float
fla/modules/backends/triton_ascend/fused_cross_entropy.py:158
↓ 1 callersFunctionfused_gdn_gate
r""" Fused GDN gate computation with autograd support. Computes: ``g = -A_log.exp() * softplus(g + dt_bias)`` Args: g (torch.Ten
fla/ops/gated_delta_rule/gate.py:310
↓ 1 callersFunctionfused_grpo_loss
compute grpo loss, save memory(no addition usage) and fast speed(6X for A800) Args: logtits: Tensor, [B, L+1, vocab_size], the origi
fla/modules/grpo.py:300
↓ 1 callersFunctionfused_grpo_loss_npu
( logits, ref_logp, input_ids, advantages, beta=0.1, completion_mask=None, save_kl
fla/modules/backends/triton_ascend/grpo.py:240
↓ 1 callersFunctionfused_kl_div_backward
( do: torch.Tensor, dx: torch.Tensor, dw: torch.Tensor, )
fla/modules/fused_kl_div.py:207
↓ 1 callersFunctionfused_kl_div_backward_npu
( do: torch.Tensor, dx: torch.Tensor, dw: torch.Tensor, )
fla/modules/backends/triton_ascend/fused_kl_div.py:163
↓ 1 callersFunctionfused_kl_div_forward
( x: torch.Tensor, target_x: torch.Tensor, weight: torch.Tensor, target_weight: torch.Tensor,
fla/modules/fused_kl_div.py:124
↓ 1 callersFunctionfused_kl_div_forward_npu
( x: torch.Tensor, target_x: torch.Tensor, weight: torch.Tensor, target_weight: torch.Tensor,
fla/modules/backends/triton_ascend/fused_kl_div.py:103
↓ 1 callersFunctionfused_kl_div_loss
Args: x (`torch.Tensor`): Tensor of shape `[batch_size * seq_len, hidden_size]`. target_x (`torch.Tensor`):
fla/modules/fused_kl_div.py:273
↓ 1 callersFunctionfused_linear_cross_entropy_backward
( do: torch.Tensor, dx: torch.Tensor, dw: torch.Tensor, db: torch.Tensor, )
fla/modules/fused_linear_cross_entropy.py:414
↓ 1 callersFunctionfused_linear_cross_entropy_backward_npu
( do: torch.Tensor, dx: torch.Tensor, dw: torch.Tensor, db: torch.Tensor, )
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:302
↓ 1 callersFunctionfused_linear_cross_entropy_forward
( x: torch.Tensor, target: torch.LongTensor, weight: torch.Tensor, bias: torch.Tensor = None,
fla/modules/fused_linear_cross_entropy.py:277
↓ 1 callersFunctionfused_linear_cross_entropy_forward_npu
( x: torch.Tensor, target: torch.LongTensor, weight: torch.Tensor, bias: torch.Tensor = None,
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:199
↓ 1 callersFunctionfused_linear_cross_entropy_loss
Args: x (torch.Tensor): [batch_size * seq_len, hidden_size] target (torch.LongTensor): [batch_size * seq_len] where e
fla/modules/fused_linear_cross_entropy.py:552
↓ 1 callersFunctionfused_recurrent_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor | None = None, g_gamm
fla/ops/common/fused_recurrent.py:467
↓ 1 callersFunctionfused_recurrent_comba_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, p: torch.Tensor, g: torch.Tensor,
fla/ops/comba/fused_recurrent.py:121
↓ 1 callersFunctionfused_recurrent_delta_rule_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, dht: torch.Tensor
fla/ops/delta_rule/fused_recurrent.py:308
↓ 1 callersFunctionfused_recurrent_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, scale: float,
fla/ops/delta_rule/fused_recurrent.py:256
↓ 1 callersFunctionfused_recurrent_dplr_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Tensor, b: torch.Tensor,
fla/ops/generalized_delta_rule/dplr/fused_recurrent.py:111
↓ 1 callersFunctionfused_recurrent_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor | None = None, g_gamm
fla/ops/common/fused_recurrent.py:405
↓ 1 callersFunctionfused_recurrent_gated_delta_rule_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor | None = None, gk: to
fla/ops/gated_delta_rule/fused_recurrent.py:182
↓ 1 callersFunctionfused_recurrent_gated_oja_rule
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, gv: torch.Tensor | None = None, beta:
fla/ops/gated_oja_rule/fused_recurrent.py:219
↓ 1 callersFunctionfused_recurrent_gdn2_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, b: torch.Tensor,
fla/ops/gdn2/fused_recurrent.py:252
↓ 1 callersFunctionfused_recurrent_gsa_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Tensor, g: torch.Tensor,
fla/ops/gsa/fused_recurrent.py:232
↓ 1 callersFunctionfused_recurrent_gsa_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Tensor, g: torch.Tensor,
fla/ops/gsa/fused_recurrent.py:139
↓ 1 callersFunctionfused_recurrent_gsa_inference
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Tensor, g: torch.Tensor,
fla/ops/gsa/fused_recurrent.py:88
↓ 1 callersFunctionfused_recurrent_hgrn_bwd
( g: torch.Tensor, o: torch.Tensor, do: torch.Tensor, dht: torch.Tensor = None, initial_st
fla/ops/hgrn/fused_recurrent.py:186
↓ 1 callersFunctionfused_recurrent_hgrn_fwd
( x: torch.Tensor, g: torch.Tensor, initial_state: torch.Tensor = None, output_final_state: bo
fla/ops/hgrn/fused_recurrent.py:159
↓ 1 callersFunctionfused_recurrent_iplr_delta_rule
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: q (torch.Tensor):
fla/ops/generalized_delta_rule/iplr/fused_recurrent.py:393
↓ 1 callersFunctionfused_recurrent_oja_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, gv: torch.Tensor | None = None, beta:
fla/ops/gated_oja_rule/fused_recurrent.py:121
↓ 1 callersFunctionfused_recurrent_rwkv4_backward
( w: Tensor, u: Tensor, k: Tensor, v: Tensor, state: Tensor, grad_wkv: Tensor, gra
fla/ops/rwkv4/fused_recurrent.py:361
↓ 1 callersFunctionfused_recurrent_rwkv4_forward
( w: Tensor, u: Tensor, k: Tensor, v: Tensor, state: Tensor, )
fla/ops/rwkv4/fused_recurrent.py:116
↓ 1 callersFunctionfused_recurrent_rwkv6_bwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, u: torch.Tensor,
fla/ops/rwkv6/fused_recurrent.py:402
↓ 1 callersFunctionfused_recurrent_rwkv6_fwd
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, u: torch.Tensor,
fla/ops/rwkv6/fused_recurrent.py:356
↓ 1 callersFunctionfused_recurrent_rwkv7_fwd
( r: torch.Tensor, w: torch.Tensor, k: torch.Tensor, v: torch.Tensor, kk: torch.Tensor,
fla/ops/rwkv7/fused_recurrent.py:133
↓ 1 callersMethodfuzzy_matches
(self, entry_key: Any)
fla/ops/utils/cache.py:178
↓ 1 callersFunctionfwd
(fn, *args)
benchmarks/modules/benchmark_activations.py:18
↓ 1 callersFunctionfwdbwd
(fn, *args)
benchmarks/modules/benchmark_activations.py:22
↓ 1 callersFunctiongate_output_correction_backward_triton
(grad_output, o, r, k, r_k, v, g)
fla/ops/rwkv7/gate_output_correction.py:185
↓ 1 callersFunctiongate_output_correction_ref
o: [B, T, H*D] r: [B, T, H, D] k: [B, T, H, D] r_k: [H, D] v: [B, T, H, D] g: [B, T, H*D]
fla/ops/rwkv7/gate_output_correction.py:15
↓ 1 callersFunctiongdn_gate_chunk_cumsum
( g: torch.Tensor, A_log: torch.Tensor, chunk_size: int, scale: float = None, dt_bias: tor
fla/ops/gated_delta_rule/gate.py:157
↓ 1 callersFunctiongdn_gate_fwd
( g: torch.Tensor, A_log: torch.Tensor, dt_bias: torch.Tensor | None = None, output_dtype: tor
fla/ops/gated_delta_rule/gate.py:260
↓ 1 callersFunctiongelu_bwd
(g, x)
fla/modules/activations.py:503
↓ 1 callersFunctiongelu_fwd
(x)
fla/modules/activations.py:495
↓ 1 callersMethodgenerate
(self, *args, **kwargs)
fla/models/mla/modeling_mla.py:360
↓ 1 callersMethodgenerate_conv
(self)
scripts/utils/autotune_generate.py:111
↓ 1 callersFunctiongenerate_fla_cache
Generate Triton cache with custom directory.
scripts/utils/autotune_generate.py:126
↓ 1 callersMethodgenerate_gdn
(self)
scripts/utils/autotune_generate.py:92
↓ 1 callersMethodgenerate_kda
(self)
scripts/utils/autotune_generate.py:57
↓ 1 callersFunctionget_abs_err
(x, y)
fla/utils/_testing.py:18
↓ 1 callersFunctionget_all_max_shared_mem
()
fla/utils/_device.py:158
↓ 1 callersFunctionget_args
()
benchmarks/cp/test_gdn_with_cp.py:70
↓ 1 callersFunctionget_args
()
benchmarks/cp/benchmark_kda_cp8_vs_cp2tp.py:42
↓ 1 callersFunctionget_backend_methods_from_dir
Scan all .py files in a backend directory to find dispatch method names.
scripts/find_dependent_tests.py:81
↓ 1 callersFunctionget_changed_files
(base: str, head: str)
scripts/run_benchmark_compare.py:74
↓ 1 callersFunctionget_cp_cu_seqlens
( cu_seqlens: torch.LongTensor, cu_seqlens_cpu: torch.LongTensor | None = None, world_size: int |
fla/ops/cp/context.py:61
↓ 1 callersFunctionget_definitions_from_tree
(tree)
scripts/find_dependent_tests.py:29
↓ 1 callersFunctionget_err_ratio
(x, y)
fla/utils/_testing.py:22
↓ 1 callersFunctionget_imports_from_tree
Return set of (module_path, symbol_name) tuples. module_path is the import source module (e.g., 'fla.ops.kda.wy_fast'). symbol_name is th
scripts/find_dependent_tests.py:39
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/mamba2/modeling_mamba2.py:265
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/deltaformer/modeling_deltaformer.py:204
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/deltaformer/modeling_deltaformer.py:305
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/mamba/modeling_mamba.py:190
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/samba/modeling_samba.py:262
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/log_linear_mamba2/modeling_log_linear_mamba2.py:294
↓ 1 callersMethodget_input_embeddings
(self)
fla/models/mamba3/modeling_mamba3.py:181
↓ 1 callersFunctionget_log_probs
(logits, input_ids)
fla/modules/grpo.py:337
↓ 1 callersFunctionget_max_num_splits
( cu_seqlens: torch.LongTensor, chunk_size: int, cu_seqlens_cpu: torch.LongTensor | None = None )
fla/ops/utils/index.py:176
↓ 1 callersFunctionget_num_levels
(length: int, base: int)
fla/layers/log_linear_mamba2.py:34
↓ 1 callersFunctionget_nvgpu_memory_usage
()
scripts/check_gpu.py:46
↓ 1 callersFunctionget_package_version
()
setup.py:19
↓ 1 callersFunctionget_random_ref_log_probs
(logits, input_ids)
tests/modules/test_grpo.py:27
↓ 1 callersMethodget_seq_length
Returns the sequence length of the cached states. A layer index can be optionally passed.
fla/models/utils.py:322
↓ 1 callersMethodget_shared_memory
(cls, arch: str)
fla/utils/_device.py:176
↓ 1 callersFunctionget_train_args
()
legacy/training/flame/parser.py:83
↓ 1 callersFunctiongroup_norm_ref
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, num_groups: int, residual: to
fla/modules/layernorm.py:88
↓ 1 callersFunctiongrpo_loss_torch
(logits, ref_logp, input_ids, advantages, beta=0.1, completion_mask=None, save_kl=False)
fla/modules/grpo.py:336
↓ 1 callersFunctionguarded
(x, y=None)
tests/test_utils.py:51
↓ 1 callersFunctioninit_distributed
Initialize distributed environment for a single process.
tests/context_parallel/test_cp_token_shift.py:49
↓ 1 callersFunctioninit_distributed
Initialize distributed environment for a single process.
tests/context_parallel/test_cp_dplr.py:54
↓ 1 callersFunctioninit_distributed
Initialize distributed environment for a single process.
tests/context_parallel/test_cp_conv.py:67
↓ 1 callersFunctioninit_distributed
Initialize distributed environment for a single process.
tests/context_parallel/test_cp_kda.py:82
↓ 1 callersFunctioninit_distributed
Initialize distributed environment for a single process.
tests/context_parallel/test_cp_gdn.py:80
↓ 1 callersMethodinit_weights_
Initialize trainable map as identity
fla/modules/feature_map.py:58
↓ 1 callersFunctioninit_weights_with_asymmetric_pattern
Initialize weights with asymmetric patterns for debugging. Args: module: The module to initialize weights for.
tests/models/test_modeling_utils.py:55
↓ 1 callersFunctioninput_guard
A decorator to make sure all input tensors are contiguous and set the device based on input tensors. Args: no_guard_contiguous (bool
fla/utils/_decorators.py:97
← previousnext →701–800 of 2,989, ranked by callers