Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/facebookresearch/xformers
/ functions
Functions
1,445 in github.com/facebookresearch/xformers
⨍
Functions
1,445
◇
Types & classes
346
↳
Endpoints
17
Method
build_env
(self)
xformers/_cpp_lib.py:51
Method
build_extensions
(self)
setup.py:411
Method
bw
(self)
xformers/benchmarks/benchmark_indexing.py:85
Method
bw
(self)
xformers/benchmarks/benchmark_indexing.py:134
Method
bw
(self)
xformers/benchmarks/benchmark_sp24.py:131
Function
cache_prefix
Take a prefix view of a larger cache. The original cache object remains of identical size and valid after the shrinked alias has been us
examples/llama_inference/model.py:371
Function
causal_1d_pattern
(attn_size: int)
xformers/components/attention/attention_patterns.py:92
Method
cleanup_at_exit
(cls)
xformers/fwbw_overlap.py:379
Function
compute_once
(func)
xformers/__init__.py:32
Method
copy_extensions_to_source
Used for `pip install -e .` Copies everything we built back into the source repo
setup.py:420
Method
createTensors
xformers/csrc/sparse24/sparse24_metadata.h:244
Method
createTensors
xformers/csrc/sparse24/sparse24_metadata.h:269
Method
create_compressed_representation
xformers/csrc/sparse24/sparse24_metadata.h:65
Method
create_compressed_representation
xformers/csrc/sparse24/sparse24_metadata.h:157
Method
cuda_version
(self)
xformers/_cpp_lib.py:27
Method
current_stream_wait
(self)
xformers/fwbw_overlap.py:35
Method
current_stream_wait
(self)
xformers/fwbw_overlap.py:100
Function
deprecated_function
(self)
xformers/_deprecation_warning.py:9
Function
dequant_func
(x, scale)
xformers/ops/fmha/common.py:133
Function
dilated_2d_pattern
Returns a 2d pattern that samples 1 every k elements in the attention mask. Can be seen as a form of downsampling, where every pixel attends
xformers/components/attention/attention_patterns.py:155
Function
early_config_prune
(configs, named_args, **kwargs)
xformers/ops/fmha/_triton/splitk_kernels.py:631
Function
efficient_attention_backward_ck
xformers/csrc/attention/hip_fmha/attention_backward_generic_ck_tiled.cpp:36
Function
efficient_attention_backward_ck_meta
xformers/csrc/attention/hip_fmha/attention_backward_generic_ck_tiled.cpp:548
Function
efficient_attention_forward_ck
There are 2 modes for using this function. (Mode BMHK) With all the heads having the same seqlen (Mode 1MHK) `batch=1` with all tokens across batc
xformers/csrc/attention/hip_fmha/attention_forward_generic_ck_tiled.cpp:50
Function
efficient_attention_forward_ck_meta
There are 2 modes for using this function. (Mode BMHK) With all the heads having the same seqlen (Mode 1MHK) `batch=1` with all tokens across batc
xformers/csrc/attention/hip_fmha/attention_forward_generic_ck_tiled.cpp:475
Function
efficient_attention_forward_decoder_splitk_ck
xformers/csrc/attention/hip_decoder/attention_forward_splitk.cpp:293
Function
efficient_attention_forward_decoder_splitk_ck_impl
xformers/csrc/attention/hip_decoder/attention_forward_splitk.cpp:251
Method
enable_if_t<Cond, Kargs> MakeKargs
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:88
Method
ext_vector_t<float, vec_size> scalar_scale_acc
xformers/csrc/attention/hip_decoder/ck_tile_attention_forward_decoder_splitk.h:10
Function
f
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, )
tests/test_fmha_merge_attentions.py:646
Function
fallback_dispatcher
(func, types, args, kwargs)
xformers/ops/sp24.py:236
Method
flash_version
(self)
xformers/_cpp_lib.py:43
Function
flush_pending_bw
Flush all BW chunks that we can compute recursively
xformers/fwbw_overlap.py:488
Method
fold
(x)
xformers/ops/fmha/cutlass_blackwell.py:435
Method
forward
(self, *args, **kwargs)
xformers/checkpoint.py:520
Method
forward
(ctx: torch.autograd.function.FunctionCtx, *tensors: torch.Tensor)
xformers/fwbw_overlap.py:147
Method
forward
( ctx: torch.autograd.function.FunctionCtx, holder: EventOverlapHolder, *tensors: torc
xformers/fwbw_overlap.py:176
Method
forward
( ctx: torch.autograd.function.FunctionCtx, holder: EventOverlapHolder, *tensors: torc
xformers/fwbw_overlap.py:206
Method
forward
( ctx: torch.autograd.function.FunctionCtx, boundary: PhaseBoundary, *x: torch.Tensor,
xformers/fwbw_overlap.py:399
Method
forward
(ctx, x: torch.Tensor, algo: str, gradient: str, backend: str)
xformers/ops/sp24.py:602
Method
forward
( ctx, x: torch.Tensor, algo: str, backend: str, bw_mul0: float,
xformers/ops/sp24.py:648
Method
forward
(ctx, x: torch.Tensor, pattern: Sparse24Tensor, gradient: str, backend: str)
xformers/ops/sp24.py:682
Method
forward
( # type: ignore[override] ctx, input_: torch.Tensor, process_group: torch.distributed.ProcessGroup
xformers/ops/differentiable_collectives.py:85
Method
forward
( # type: ignore[override] ctx, input_: torch.Tensor, process_group: torch.distributed.ProcessGroup
xformers/ops/differentiable_collectives.py:109
Method
forward
( # type: ignore[override] ctx, x: torch.Tensor, process_group: torch.distributed.ProcessGroup )
xformers/ops/differentiable_collectives.py:133
Method
forward
( # type: ignore[override] ctx, x: torch.Tensor, process_group: torch.distributed.ProcessGroup )
xformers/ops/differentiable_collectives.py:161
Method
forward
(self, input_: torch.Tensor)
xformers/ops/modpar_layers.py:94
Method
forward
(self, input_: torch.Tensor)
xformers/ops/modpar_layers.py:149
Method
forward
( ctx, x: torch.Tensor, index: torch.Tensor, source: torch.Tensor, sca
xformers/ops/indexing.py:46
Method
forward
( ctx, *args: torch.Tensor, )
xformers/ops/indexing.py:135
Method
forward
(self, x: torch.Tensor)
xformers/ops/rmsnorm.py:99
Method
forward
(cls, ctx, x, w1, b1, w2, b2, w3, b3)
xformers/ops/swiglu_op.py:39
Method
forward
Computes :attr:`swiglu` with the module's weights Args: x (torch.Tensor): A Tensor of shape ``[..., in_features]`` Retur
xformers/ops/swiglu_op.py:343
Method
forward
(ctx, x: torch.Tensor, dim: int)
xformers/ops/unbind.py:88
Method
forward
(ctx, dim: int, *tensors: torch.Tensor)
xformers/ops/unbind.py:105
Method
forward
( ctx: torch.autograd.function.FunctionCtx, query: torch.Tensor, key: torch.Tensor,
xformers/ops/fmha/merge_training.py:42
Method
forward
( ctx: torch.autograd.function.FunctionCtx, *inputs: torch.Tensor, )
xformers/ops/fmha/merge_training.py:89
Method
forward
(ctx, op_fw, op_bw, *args: Any)
xformers/ops/fmha/__init__.py:86
Method
forward
(self, input: torch.Tensor)
xformers/benchmarks/benchmark_sp24.py:102
Method
forward
(self, x)
tests/test_checkpoint.py:139
Method
forward
(self, x)
tests/test_checkpoint.py:257
Method
forward
(self, x)
tests/test_checkpoint.py:284
Method
forward
(self, x)
tests/test_rmsnorm.py:38
Method
forward
(self, input: torch.Tensor)
tests/test_sparsity24.py:772
Method
forward
(self, x: torch.Tensor)
tests/test_sparsity24.py:975
Method
forward
(ctx, x)
tests/test_sparsity24.py:1044
Method
forward
( ctx: Any, journal: list[str], name: str, tensor: torch.Tensor )
tests/test_fwbw_overlap.py:22
Method
forward
(ctx: Any, x: torch.Tensor)
tests/test_fwbw_overlap.py:136
Method
forward
(self, x: torch.Tensor)
examples/llama_inference/model.py:201
Method
forward
( self, x: torch.Tensor, cache: LayerCache, attn_bias: AttnBias, )
examples/llama_inference/model.py:243
Method
forward
( self, token_values: torch.Tensor, token_lengths: torch.Tensor, start_pos: to
examples/llama_inference/model.py:308
Method
from_seqlens
( cls, seqlens: Iterable[int], *, device: Optional[torch.device] = None )
xformers/ops/fmha/attn_bias.py:566
Method
from_seqlens
( cls, seqlens: Iterable[int], *, device: Optional[torch.device] = None )
xformers/ops/fmha/attn_bias.py:709
Method
from_seqlens
Creates a :attr:`BlockDiagonalMask` from a list of tensors lengths for query and key/value. Args: q_seqlen (Union[Sequence[int],
xformers/ops/fmha/attn_bias.py:849
Method
from_seqlens
Creates a :attr:`BlockDiagonalPaddedKeysMask` from a list of tensor lengths for query and key/value. Args: q_seqlen (Sequ
xformers/ops/fmha/attn_bias.py:1140
Method
from_seqlens
Creates a :attr:`BlockDiagonalCausalWithOffsetPaddedKeysMask` from a list of tensor lengths for query and key/value. Args:
xformers/ops/fmha/attn_bias.py:1246
Method
from_seqlens
Creates a :attr:`PagedBlockDiagonalPaddedKeysMask` from a list of tensor lengths for query and key/value. Args: q_seqlen
xformers/ops/fmha/attn_bias.py:1470
Method
from_seqlens
Creates a :attr:`BlockDiagonalGappyKeysMask` from a list of tensor lengths for query and key/value.
xformers/ops/fmha/attn_bias.py:1576
Method
from_seqlens
Creates a :attr:`PagedBlockDiagonalGappyKeysMask` from a list of tensor lengths for query and key/value. Note that unlike :attr:`Bloc
xformers/ops/fmha/attn_bias.py:1787
Method
from_seqlens_inplace
Perform in-place update. You can only update with the same shape. Can be useful with CUDA graphs.
xformers/ops/fmha/attn_bias.py:454
Method
from_seqlens_local
( cls, q_seqlen: Sequence[int], kv_padding: int, kv_seqlen: Sequence[int],
xformers/ops/fmha/attn_bias.py:1385
Method
from_seqlens_padded_inplace
Perform in-place update. You can only update with the same shape. Can be useful with CUDA graphs. Note: we don't update paddi
xformers/ops/fmha/attn_bias.py:602
Method
from_tree_choices_cached
( cls, tree_choices: Tuple[Tuple[int, ...]], dtype: Optional[torch.dtype] = None,
xformers/ops/tree_attention.py:133
Function
func_wrapper
()
xformers/__init__.py:35
Function
fused_group_contiguous_nan_clamp_copied_from_inductor
( _group_a_ptrs: "VAR_ARGS_ARRAY", # type: ignore # noqa: F821 XBLOCK: tl.constexpr, )
tests/test_triton_varargs.py:148
Method
fw
(self)
xformers/benchmarks/benchmark_attn_decoding.py:155
Method
fw
(self)
xformers/benchmarks/benchmark_attn_decoding.py:370
Method
fw
(self)
xformers/benchmarks/benchmark_indexing.py:76
Method
fw
(self)
xformers/benchmarks/benchmark_indexing.py:94
Method
fw
(self)
xformers/benchmarks/benchmark_indexing.py:131
Method
fw
(self)
xformers/benchmarks/benchmark_indexing.py:141
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:77
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:90
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:136
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:142
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:148
Method
fw
(self)
xformers/benchmarks/benchmark_sp24.py:154
Function
fwd_splitkv_get_mtile_size
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_splitkv_setting.h:153
Function
fwd_splitkv_smallq_get_mtile_size
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_splitkv_smallq_setting.h:115
Function
g
(q: torch.Tensor, k1: torch.Tensor, v1: torch.Tensor)
tests/test_fmha_merge_attentions.py:670
← previous
next →
801–900 of 1,445, ranked by callers