MCPcopy Create free account

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

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

Functionchunkwise_fwd_kernel
( q, k, v, g, level_scales, llut, o, h0, ht, offsets, new_offsets,
fla/ops/log_linear_attn/chunk.py:42
Functionclear_intracard_cache
()
tests/ops/test_intracard_cache.py:22
Functioncombine_params
(theta, alpha, eta, seq_len)
fla/ops/titans/naive.py:72
Functioncompute_dh0_kernel
( dy, y, weight, dh0, cu_seqlens, stride_dy_n, stride_dy_t, stride_dy_d, s
fla/modules/backends/triton_ascend/causal_conv1d.py:528
Functioncompute_dh0_kernel
Compute dh0 (gradient w.r.t. initial_state) in a separate kernel. This avoids Triton compiler bugs on some architectures (e.g., GB200).
fla/modules/conv/triton/kernels.py:433
Methodcompute_dh0_triton
( self, dy, y, weight, initial_state, activation, cu_s
fla/modules/backends/triton_ascend/__init__.py:341
Functionconfigure_fla_cache_autotune
()
fla/ops/utils/cache.py:435
Functioncontiguous
Alias for input_guard() without parameters.
fla/utils/_decorators.py:163
Methodcopy_for_backward
Create a copy for backward pass (useful when PP_SIZE > 1).
fla/ops/cp/context.py:35
Functioncopy_input_kernel
( q, k, v, g, level_scales, cu_seqlens, q_prev, k_prev, v_prev, g_prev
fla/ops/log_linear_attn/chunk.py:678
Functioncopy_last_chunk_kernel
( q, k, v, g, level_scales, cu_seqlens, q_prev, k_prev, v_prev, g_prev
fla/ops/log_linear_attn/chunk.py:829
Functioncounted_precompute
(*args, **kwargs)
tests/ops/test_intracard_cache.py:63
Functioncross_entropy_bwd_kernel
( dlogits_ptr, # data ptrs dloss_ptr, logits_ptr, lse_ptr, labels_ptr, label_smoothin
fla/modules/fused_cross_entropy.py:108
Functioncross_entropy_bwd_kernel
( dlogits_ptr, dloss_ptr, logits_ptr, lse_ptr, labels_ptr, label_smoothing, logit_
fla/modules/backends/triton_ascend/fused_cross_entropy.py:96
Functioncross_entropy_fwd_kernel
( loss_ptr, # data ptrs lse_ptr, z_loss_ptr, logits_ptr, labels_ptr, label_smoothing,
fla/modules/fused_cross_entropy.py:32
Functioncross_entropy_fwd_kernel
( loss_ptr, lse_ptr, z_loss_ptr, logits_ptr, labels_ptr, label_smoothing, logit_sc
fla/modules/backends/triton_ascend/fused_cross_entropy.py:23
Functioncross_entropy_kernel
This kernel computes both cross entropy loss and the gradient of the input. We only consider hard label + mean reduction for now. Please
fla/modules/fused_linear_cross_entropy.py:97
Functioncross_entropy_kernel
( logits, lse, target, loss, total, ignore_index, label_smoothing: tl.constexpr,
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:70
Methodcross_entropy_loss
( self, logits, target, label_smoothing=0.0, logit_scale=1.0,
fla/modules/backends/triton_ascend/__init__.py:53
Functiondecorator
(fn)
fla/ops/utils/cache.py:420
Functiondecorator
(func: F)
fla/ops/backends/__init__.py:165
Functiondelta_rule_chunkwise
(q, k, v, beta, chunk_size=32)
fla/ops/delta_rule/naive.py:40
Functiondelta_rule_parallel
(q, k, v, beta, BM=128, BN=32)
fla/ops/delta_rule/naive.py:73
Functiondelta_rule_recurrence
(q, k, v, beta, initial_state=None, output_final_state=True)
fla/ops/delta_rule/naive.py:12
Functiondeprecate_kwarg
Decorator to notify users about deprecated keyword arguments, replacing them with a new name if specified. This decorator allows you to:
fla/utils/_decorators.py:186
Functiondispatch
Dispatch decorator with verifier support. Iterates through all registered backends and selects the first one that passes the verifier for the
fla/ops/backends/__init__.py:159
Functiondplr_chunkwise
(q, k, v, alpha, beta, gk, initial_state=None, output_final_state=True, chunk_size=32)
fla/ops/generalized_delta_rule/dplr/naive.py:41
Functionelementwise_mul_kernel
This function multiplies each element of the tensor pointed by x with the value pointed by g. The multiplication is performed in-place on the
fla/modules/fused_kl_div.py:92
Functionelementwise_mul_kernel
This function multiplies each element of the tensor pointed by x with the value pointed by g. The multiplication is performed in-place on the
fla/modules/fused_linear_cross_entropy.py:245
Functionelementwise_mul_kernel
( x, g, N: tl.constexpr, B: tl.constexpr, )
fla/modules/backends/triton_ascend/fused_kl_div.py:80
Functionelementwise_mul_kernel
( x, g, N: tl.constexpr, B: tl.constexpr, )
fla/modules/backends/triton_ascend/fused_linear_cross_entropy.py:146
Methodexact_matches
(self, entry_key: Any)
fla/ops/utils/cache.py:175
Methodfail
(msg, *args)
fla/ops/utils/cache.py:200
Functionfla_cache_autotune
Decorator for auto-tuning a :code:`triton.jit`'d function with FLA config support. Extends Triton's autotune to load best configurations fro
fla/ops/utils/cache.py:405
Functionfn_to_call
()
benchmarks/modules/benchmark_activations.py:99
Methodforward
(ctx, q, k, v, s, initial_state, output_final_state)
fla/ops/abc/chunk.py:839
Methodforward
( ctx, q, k, v, self_attn_cu_seqlens, moba_q, moba_kv,
fla/ops/moba/parallel.py:109
Methodforward
(ctx, o, q, k, scale, z_init, reverse, cu_seqlens)
fla/ops/linear_attn/utils.py:21
Methodforward
( ctx, x: torch.Tensor, cu_seqlens: torch.Tensor, padding_side: str, )
fla/ops/utils/pack.py:118
Methodforward
( ctx, x: torch.Tensor, cu_seqlens: torch.Tensor, padding_side: str, d
fla/ops/utils/pack.py:154
Methodforward
( ctx, x: torch.Tensor, chunk_size: int, cu_seqlens: torch.LongTensor | None =
fla/ops/utils/pooling.py:171
Methodforward
( ctx, q, k, v, g, beta, lamb, cu_seqlens,
fla/ops/mesa_net/chunk.py:189
Methodforward
(ctx, o, r, k, r_k, v, g)
fla/ops/rwkv7/gate_output_correction.py:221
Methodforward
(ctx, k, a, ka, cu_seqlens=None, cu_seqlens_cpu=None)
fla/ops/rwkv7/fused_k_update.py:328
Methodforward
( ctx, hidden_states, delta, x_r, x_w, x_k, x_v, x_a, x_g, )
fla/ops/rwkv7/fused_addcmul.py:223
Methodforward
(ctx, x, x_prev, x_k, key_weight, value_weight, inplace: bool = True)
fla/ops/rwkv7/channel_mixing.py:307
Methodforward
( ctx, qo: torch.Tensor, ko: torch.Tensor, vo: torch.Tensor, betao: to
fla/ops/deltaformer/parallel.py:667
Methodforward
( ctx, x: torch.Tensor, g: torch.Tensor, initial_state: torch.Tensor = None,
fla/ops/hgrn/fused_recurrent.py:221
Methodforward
(ctx, x, g, initial_state=None, output_final_state=False)
fla/ops/hgrn/chunk.py:223
Methodforward
(ctx, q, k, v, scale)
fla/ops/based/parallel.py:311
Methodforward
(ctx, q, k, v, scale=1)
fla/ops/based/fused_chunk.py:296
Methodforward
(ctx, q, k, v, g, sink_bias, scale, window_size, cu_seqlens, g_scalar=None, chunk_indices=None)
fla/ops/wall_attn/parallel.py:814
Methodforward
(ctx, q, k, v, w, beta, g, scale, cu_seqlens, use_cache=False)
fla/ops/path_attn/parallel.py:33
Methodforward
(ctx, q, k, v, g, sink_bias, scale, window_size, cu_seqlens, chunk_indices=None)
fla/ops/attn/parallel.py:725
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/gdn2/chunk.py:45
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Ten
fla/ops/generalized_delta_rule/iplr/fused_recurrent.py:285
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Ten
fla/ops/generalized_delta_rule/iplr/chunk.py:384
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Ten
fla/ops/generalized_delta_rule/dplr/fused_recurrent.py:161
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a: torch.Ten
fla/ops/generalized_delta_rule/dplr/chunk.py:138
Methodforward
(ctx, q, r, k, v, scale, window_size_left, cu_seqlens)
fla/ops/parallax/parallel.py:728
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, w: torch.Ten
fla/ops/rwkv6/fused_recurrent.py:507
Methodforward
( ctx, q, k, v, g, u, scale, initial_state,
fla/ops/rwkv6/chunk.py:1177
Methodforward
(ctx, q, k, v, scale)
fla/ops/rebased/parallel.py:354
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/gated_delta_product/chunk.py:127
Methodforward
( ctx: FunctionCtx, w: Tensor, u: Tensor, k: Tensor, v: Tensor,
fla/ops/rwkv4/fused_recurrent.py:452
Methodforward
(ctx, x: torch.Tensor, scale: float = 1.0)
fla/ops/common/gate.py:91
Methodforward
( ctx, q, k, v, g, g_gamma, scale, initial_sta
fla/ops/common/fused_chunk.py:524
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/common/fused_recurrent.py:558
Methodforward
( ctx, q, k, v, g, scale, initial_state, outpu
fla/ops/gla/chunk.py:1266
Methodforward
( ctx, g: torch.Tensor, A_log: torch.Tensor, dt_bias: torch.Tensor | None = No
fla/ops/gated_delta_rule/gate.py:289
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/gated_delta_rule/fused_recurrent.py:255
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/gated_delta_rule/chunk.py:246
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, gv: torch.Te
fla/ops/gated_oja_rule/fused_recurrent.py:179
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, gv: torch.Te
fla/ops/gated_oja_rule/chunk.py:216
Methodforward
( ctx, query: torch.Tensor, rms_weight: torch.Tensor, output_rms_weight: torch
fla/ops/attnres/fused.py:441
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, p: torch.Tensor, v: torch.Ten
fla/ops/comba/fused_recurrent.py:183
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, p: torch.Ten
fla/ops/comba/chunk.py:187
Methodforward
(ctx, q, k, v, block_indices, block_counts, block_size, scale, cu_seqlens)
fla/ops/nsa/parallel.py:730
Methodforward
( ctx, q, k, v, block_size, scale, cu_seqlens, )
fla/ops/nsa/compression.py:477
Methodforward
(ctx, q, k, v, beta, scale, output_attentions)
fla/ops/delta_rule/parallel.py:242
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.
fla/ops/delta_rule/fused_recurrent.py:382
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, beta: torch.
fla/ops/delta_rule/chunk.py:147
Methodforward
(ctx, q, k, v, w, b, BT, eta, scale, eps, initial_state, initial_state_bias, output_final_stat
fla/ops/ttt/fused_chunk.py:670
Methodforward
( ctx, q, k, v, w, b, chunk_size, eta,
fla/ops/ttt/chunk.py:1293
Methodforward
( ctx, g: torch.Tensor, A_log: torch.Tensor, dt_bias: torch.Tensor | None = No
fla/ops/kda/gate.py:286
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Ten
fla/ops/kda/chunk.py:28
Methodforward
( ctx, q, k, v, g, level_scales, initial_state,
fla/ops/log_linear_attn/chunk.py:1516
Methodforward
(ctx, q, k, v, g, scale, output_attentions, cu_seqlens, cu_seqlens_cpu)
fla/ops/simple_gla/parallel.py:628
Methodforward
( ctx, q, k, v, g, g_gamma, scale, initial_sta
fla/ops/simple_gla/chunk.py:145
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Ten
fla/ops/gsa/fused_recurrent.py:359
Methodforward
( ctx, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, s: torch.Ten
fla/ops/gsa/chunk.py:950
Methodforward
(self, x, residual=None, prenorm=False)
fla/modules/layernorm.py:171
Methodforward
( ctx, x, weight, bias, residual: torch.Tensor = None, eps: fl
fla/modules/layernorm.py:737
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1011
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1073
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1128
Methodforward
( ctx, x, norm_weight, norm_bias, linear_weight, linear_bias,
fla/modules/layernorm.py:1144
Methodforward
(self, x, weight, bias, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1286
Methodforward
(self, x, weight, bias, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1351
Methodforward
(self, x, weight, bias, residual=None, prenorm=False, residual_in_fp32=False)
fla/modules/layernorm.py:1408
← previousnext →1,601–1,700 of 2,989, ranked by callers