MCPcopy Create free account

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

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

↓ 1 callersFunctionprepare_wy_repr_bwd
( k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, A: torch.Tensor, dw: torch.Tensor,
fla/ops/gated_oja_rule/wy_fast.py:243
↓ 1 callersFunctionprepare_wy_repr_bwd
( k: torch.Tensor, v: torch.Tensor, p: torch.Tensor, g0: torch.Tensor, g: torch.Tensor,
fla/ops/comba/wy_fast.py:380
↓ 1 callersFunctionprepare_wy_repr_bwd
( k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, A: torch.Tensor, dw: torch.Tensor,
fla/ops/delta_rule/wy_fast.py:257
↓ 1 callersFunctionprepare_wy_repr_fwd
( a: torch.Tensor, b: torch.Tensor, v: torch.Tensor, k: torch.Tensor, cu_seqlens: torch.Lo
fla/ops/generalized_delta_rule/iplr/wy_fast.py:220
↓ 1 callersFunctionprepare_wy_repr_fwd
( k: torch.Tensor, v: torch.Tensor, beta: torch.Tensor, cu_seqlens: torch.LongTensor | None,
fla/ops/delta_rule/wy_fast.py:185
↓ 1 callersFunctionpreprocess
Load, tokenize, and save the processed dataset. Args: dataset: Path or name of the dataset. Default: 'HuggingFaceFW/fine
legacy/training/preprocess.py:69
↓ 1 callersFunctionprint_comparison
Print a comparison table with speedup ratios and detect regressions. Rows are grouped by mode with a blank line between fwd and fwdbwd. Retu
scripts/run_benchmark_compare.py:209
↓ 1 callersFunctionprint_results_table
Print old / new / speedup comparison table. Column order: ``mode B T H D op old(ms) new(ms) speedup``. The mode column (``fwd`` / ``f
benchmarks/ops/run.py:391
↓ 1 callersFunctionprint_synchronized
(*args, **kwargs)
benchmarks/cp/test_gdn_with_cp.py:165
↓ 1 callersMethodprocess_batch
Process a single batch of data
evals/ppl.py:84
↓ 1 callersFunctionprofile
( name: str, batch_size: int = 4, seq_len: int = 4096, context_len: int = 4096, varlen: bo
benchmarks/benchmark_training_throughput.py:88
↓ 1 callersFunctionprofile_kernels
Profile individual kernels using PyTorch profiler.
benchmarks/cp/benchmark_kda_cp8_vs_cp2tp.py:103
↓ 1 callersFunctionreconstruct
Reconstruct and mix transformed outputs back into the original input sequence shape. Key operations: 1. Reshapes and transposes `transfo
fla/layers/mom.py:205
↓ 1 callersFunctionref_func
(x, weight, bias, residual, cache)
tests/modules/test_conv.py:907
↓ 1 callersFunctionref_prepare_chunk_indices
(cu_seqlens, chunk_size=CHUNK_SIZE)
tests/ops/utils/test_index.py:44
↓ 1 callersFunctionref_prepare_chunk_offsets
(cu_seqlens, chunk_size=CHUNK_SIZE)
tests/ops/utils/test_index.py:54
↓ 1 callersFunctionref_prepare_sequence_ids
(cu_seqlens)
tests/ops/utils/test_index.py:36
↓ 1 callersFunctionref_varlen
(x, weight, bias, initial_state, cu_seqlens)
tests/modules/test_conv.py:982
↓ 1 callersFunctionrelu
(x)
fla/ops/utils/matmul.py:176
↓ 1 callersFunctionrequire_version
Perform a runtime check of the dependency versions, using the exact same syntax used by pip.
fla/utils/_decorators.py:168
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:155
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:997
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:1057
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:1272
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:1335
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm.py:1394
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm_gated.py:494
↓ 1 callersMethodreset_parameters
(self)
fla/modules/layernorm_gated.py:528
↓ 1 callersMethodreset_parameters
(self)
fla/modules/fused_norm_gate.py:956
↓ 1 callersMethodreset_parameters
(self)
fla/modules/fused_norm_gate.py:1021
↓ 1 callersMethodreset_parameters
(self)
fla/modules/fused_norm_gate.py:1117
↓ 1 callersMethodreset_parameters
(self)
fla/modules/fused_norm_gate.py:1194
↓ 1 callersMethodreset_parameters
(self)
fla/modules/rotary.py:384
↓ 1 callersFunctionreshape_into_chunks
Padding input_tensor with `pad_size` on the seq_len dim (dim=1) and simultaneously splitting it into chunk sequences. Assumes that we on
fla/layers/mamba2.py:64
↓ 1 callersFunctionresolve_output_dir
(output_dir: str | None, *, versioned: bool)
scripts/extract_triton_autotune_cache.py:67
↓ 1 callersFunctionrms_norm
( x: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor = None,
fla/modules/layernorm.py:868
↓ 1 callersFunctionrms_norm_gated
( x: torch.Tensor, g: torch.Tensor, weight: torch.Tensor, bias: torch.Tensor, activation:
fla/modules/fused_norm_gate.py:846
↓ 1 callersFunctionrotary_embedding_fwdbwd_npu
( x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor, seqlen_offsets: int | torch.Tensor =
fla/modules/backends/triton_ascend/rotary.py:117
↓ 1 callersFunctionrotate_half
(x, interleaved=False)
fla/modules/rotary.py:21
↓ 1 callersFunctionrun_benchmark
Main benchmark function.
benchmarks/cp/benchmark_kda_cp8_vs_cp2tp.py:163
↓ 1 callersFunctionrwkv_channel_mixing_bwd
(grad_output, x, x_prev, x_k, key_weight, value_weight, k1, k1_K, k, inplace=True)
fla/ops/rwkv7/channel_mixing.py:266
↓ 1 callersFunctionrwkv_mix_torch
(x: torch.Tensor, x_prev: torch.Tensor, x_k: torch.Tensor)
fla/ops/rwkv7/channel_mixing.py:99
↓ 1 callersFunctionrwkv_relu_and_square_torch
(x: torch.Tensor)
fla/ops/rwkv7/channel_mixing.py:107
↓ 1 callersMethodsample
(self, indices)
legacy/training/flame/data.py:110
↓ 1 callersFunctionsanitize_gpu_name
(gpu_name: str)
fla/ops/utils/cache.py:66
↓ 1 callersMethodsave
(self, output_file: Path, kernel_name: str, existing: KernelConfigFile | None)
scripts/utils/autotune_export.py:219
↓ 1 callersFunctionsegsum
(x)
fla/ops/log_linear_attn/naive.py:12
↓ 1 callersFunctionsend_recv_bwd
Backward pass communication: send gradient to previous rank, receive from next rank. Uses all_gather for simplicity and to ensure all ranks
fla/ops/cp/comm.py:102
↓ 1 callersFunctionsend_recv_fwd
Forward pass communication: send tensor to next rank, receive from previous rank. Uses all_gather for simplicity and to ensure all ranks par
fla/ops/cp/comm.py:64
↓ 1 callersMethodset_input_embeddings
(self, new_embeddings)
fla/models/mamba2/modeling_mamba2.py:268
↓ 1 callersMethodset_input_embeddings
(self, value)
fla/models/deltaformer/modeling_deltaformer.py:207
↓ 1 callersMethodset_input_embeddings
(self, new_embeddings)
fla/models/mamba/modeling_mamba.py:193
↓ 1 callersMethodset_input_embeddings
(self, new_embeddings)
fla/models/samba/modeling_samba.py:265
↓ 1 callersMethodset_input_embeddings
(self, new_embeddings)
fla/models/log_linear_mamba2/modeling_log_linear_mamba2.py:297
↓ 1 callersMethodset_input_embeddings
(self, new_embeddings)
fla/models/mamba3/modeling_mamba3.py:184
↓ 1 callersMethodshared_o
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None,
fla/layers/mom.py:659
↓ 1 callersMethodshould_check_fla_cache
(self, key: AutotuneKey)
fla/ops/utils/cache.py:367
↓ 1 callersFunctionshould_skip
(path: Path)
scripts/check_header.py:52
↓ 1 callersFunctionsigmoid_bwd
(x: torch.Tensor, dy: torch.Tensor, output_contiguous: bool = False)
fla/modules/activations.py:166
↓ 1 callersFunctionsigmoid_bwd_npu
(x: torch.Tensor, dy: torch.Tensor, output_contiguous: bool = False)
fla/modules/backends/triton_ascend/activations.py:366
↓ 1 callersFunctionsigmoid_fwd
(x: torch.Tensor, output_contiguous: bool = False)
fla/modules/activations.py:149
↓ 1 callersFunctionsigmoid_fwd_npu
(x: torch.Tensor, output_contiguous: bool = False)
fla/modules/backends/triton_ascend/activations.py:353
↓ 1 callersFunctionsizeof_fmt
(num, suffix='B')
utils/convert_from_rwkv6.py:39
↓ 1 callersFunctionsizeof_fmt
(num, suffix='B')
utils/convert_from_llama.py:40
↓ 1 callersFunctionskip_y
(x, y=None)
tests/test_utils.py:62
↓ 1 callersFunctionskip_y_with_tuple
(x, y=None)
tests/test_utils.py:70
↓ 1 callersMethodslow_forward
( self, input_states, last_state: dict | None = None, use_cache: bool | None =
fla/layers/mamba.py:304
↓ 1 callersFunctionsqrelu_bwd
(g, x)
fla/modules/activations.py:541
↓ 1 callersFunctionsqrelu_fwd
(x)
fla/modules/activations.py:535
↓ 1 callersMethodstate
(self)
legacy/training/flame/logging.py:114
↓ 1 callersFunctionstrip_old_header
Remove all project header lines from the top of the file.
scripts/check_header.py:63
↓ 1 callersMethodswiglu_linear
(self, x, y, weight, bias)
fla/modules/backends/triton_ascend/__init__.py:171
↓ 1 callersFunctionswiglu_linear_npu
(x, y, weight, bias)
fla/modules/backends/triton_ascend/activations.py:525
↓ 1 callersFunctionswish_bwd
(x: torch.Tensor, dy: torch.Tensor, output_contiguous: bool = False)
fla/modules/activations.py:409
↓ 1 callersFunctionswish_bwd_npu
(x: torch.Tensor, dy: torch.Tensor, output_contiguous: bool = False)
fla/modules/backends/triton_ascend/activations.py:436
↓ 1 callersFunctionswish_fwd
(x: torch.Tensor, output_contiguous: bool = False)
fla/modules/activations.py:392
↓ 1 callersFunctionswish_fwd_npu
(x: torch.Tensor, output_contiguous: bool = False)
fla/modules/backends/triton_ascend/activations.py:423
↓ 1 callersFunctiontanh
(x)
fla/ops/utils/matmul.py:169
↓ 1 callersFunctiontest_layer
(args)
benchmarks/cp/test_gdn_with_cp.py:791
↓ 1 callersFunctiontest_ops
(args)
benchmarks/cp/test_gdn_with_cp.py:671
↓ 1 callersFunctiontiming_value_key
(value: object)
scripts/utils/autotune_export.py:20
↓ 1 callersFunctiontitans_linear
Implementation of Titans Linear function based on the update rules: M_t = (1 - alpha_t) * M_{t-1} + S_t S_t = eta_t * S_{t-1} - theta_t *
fla/ops/titans/naive.py:122
↓ 1 callersMethodto_entry
(self)
scripts/utils/autotune_export.py:66
↓ 1 callersFunctiontoken_shift_cp
Context Parallel version of token_shift. Args: x: Input tensor of shape [1, T, D] cp_context: CP context (required for CP mo
fla/modules/token_shift_cp.py:204
↓ 1 callersFunctiontokenize
Tokenize the input text and split into chunks of specified context length. Args: examples: Dictionary containing the inp
legacy/training/preprocess.py:22
↓ 1 callersMethodtokenize
(self, data, batch_size: int = 64)
legacy/training/flame/data.py:95
↓ 1 callersMethodtorch_forward
( self, input_states, last_state: dict | None = None, use_cache: bool = False,
fla/layers/mamba2.py:460
↓ 1 callersFunctiontransform
Reorganize token embeddings into memory-aligned chunks. Steps: - Expand for top-k routing if needed. - Mask out padded token
fla/layers/mom.py:113
↓ 1 callersFunctiontransform_q_fwd_fn
( q, w1, w2, cu_seqlens, BT, BS, S, chunk_indices: torch.LongTensor | None = N
fla/ops/path_attn/transform_q.py:76
↓ 1 callersFunctiontranslate_into_fla
(name)
utils/convert_from_rwkv7.py:71
↓ 1 callersFunctiontril_softmax
Row-wise causal softmax over strictly lower-triangular (j < i) positions. Args: scores: [B, H, T, T] raw attention scores (q @ k^T).
fla/ops/deltaformer/naive.py:13
↓ 1 callersFunctiontriton_func
(x, weight, bias, residual, cache)
tests/modules/test_conv.py:921
↓ 1 callersFunctionttt_linear
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Tensor, b: torch.Tensor,
fla/ops/ttt/naive.py:12
↓ 1 callersFunctionunpack_sequence
( x: torch.Tensor, cu_seqlens: torch.Tensor, padding_side: str = 'left', desired_shape: torch.
fla/ops/utils/pack.py:201
↓ 1 callersMethodunpad_after_conv
(self, conv_cu_seqlens, cu_seqlens, cu_q, cu_k, cu_v, pad_lengths)
fla/layers/mom.py:787
↓ 1 callersMethodupdate_default_config
(self)
scripts/utils/autotune_export.py:137
↓ 1 callersMethodverify
Check if backend can handle the function call.
fla/ops/backends/__init__.py:77
↓ 1 callersMethodwrite_backup
( backup_file: Path, kernel_name: str, backup_entries: list[dict[str, object]], )
scripts/utils/autotune_export.py:192
↓ 1 callersFunctionwu_fwd
( a: torch.Tensor, v: torch.Tensor, k: torch.Tensor, A: torch.Tensor, cu_seqlens: torch.Lo
fla/ops/generalized_delta_rule/iplr/wy_fast.py:266
↓ 1 callersFunctionwu_fwd
( ag: torch.Tensor, v: torch.Tensor, A_ak: torch.Tensor, A_ab_inv: torch.Tensor, cu_seqlen
fla/ops/generalized_delta_rule/dplr/wy_fast_fwd.py:212
← previousnext →901–1,000 of 2,989, ranked by callers