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
↓ 1 callers
Function
run_code
()
tests/test_fmha_merge_attentions.py:554
↓ 1 callers
Function
run_fused_ag
()
xformers/benchmarks/benchmark_sequence_parallel_fused.py:218
↓ 1 callers
Function
run_fused_rs
()
xformers/benchmarks/benchmark_sequence_parallel_fused.py:229
↓ 1 callers
Function
run_nccl_reference_ag
()
xformers/benchmarks/benchmark_sequence_parallel_fused.py:206
↓ 1 callers
Function
run_nccl_reference_rs
()
xformers/benchmarks/benchmark_sequence_parallel_fused.py:211
↓ 1 callers
Function
run_one
()
xformers/benchmarks/utils.py:727
↓ 1 callers
Function
run_tree_attention_inner
Test Medusa-style tree attention.
tests/test_tree_attention.py:109
↓ 1 callers
Function
scaled_index_add_bwd
( grad_output: torch.Tensor, grad_source: torch.Tensor, grad_scaling: Optional[torch.Tensor],
xformers/ops/_triton/k_scaled_index_add.py:256
↓ 1 callers
Function
scaled_index_add_fwd
( x: torch.Tensor, index: torch.Tensor, source: torch.Tensor, scaling: Optional[torch.Tensor],
xformers/ops/_triton/k_scaled_index_add.py:77
↓ 1 callers
Function
sdpa_flop_count
Count flops for self-attention. NB: We can assume that value_shape == key_shape
xformers/ops/fmha/flash3.py:193
↓ 1 callers
Function
select_prefix_op
Heuristic to decide whether to use Triton Split-k or default (Flash Attention) for prefix attention.
xformers/ops/tree_attention.py:469
↓ 1 callers
Function
selective_checkpoint_wrapper
Wrap a module with selective activation checkpointing. It behaves similarly to PyTorch's checkpoint_wrapper, but gives the possibility t
xformers/checkpoint.py:527
↓ 1 callers
Function
sequence_parallel_leading_matmul_bwd
( scattered_input: torch.Tensor, weights: List[torch.Tensor], grad_gathered_outputs: List[torch.Te
xformers/ops/seqpar.py:74
↓ 1 callers
Function
sequence_parallel_leading_matmul_fwd
( scattered_input: torch.Tensor, weights: List[torch.Tensor], fuse: bool, process_group_name:
xformers/ops/seqpar.py:32
↓ 1 callers
Function
sequence_parallel_trailing_matmul_bwd
( gathered_input: torch.Tensor, weight: torch.Tensor, grad_scattered_output: torch.Tensor, fus
xformers/ops/seqpar.py:265
↓ 1 callers
Function
sequence_parallel_trailing_matmul_fwd
( gathered_input: torch.Tensor, weight: torch.Tensor, fuse: bool, process_group_name: GroupNam
xformers/ops/seqpar.py:227
↓ 1 callers
Method
shape_not_supported_reasons
( cls, Mq: int, Mkv: int, K: int, Kv: int )
xformers/ops/fmha/common.py:420
↓ 1 callers
Method
shape_not_supported_reasons
( cls, Mq: int, Mkv: int, K: int, Kv: int )
xformers/ops/fmha/cutlass_blackwell.py:290
↓ 1 callers
Method
shape_not_supported_reasons
( cls, Mq: int, Mkv: int, K: int, Kv: int )
xformers/ops/fmha/ck_splitk.py:47
↓ 1 callers
Method
show
(self)
examples/llama_inference/stats.py:17
↓ 1 callers
Function
sort_nccl_events
( nccl_events, top_k: int = 3, last_k: int = 3 )
xformers/profiler/find_slowest.py:61
↓ 1 callers
Function
sparse24_addmm
(func, types, args=(), kwargs=None)
xformers/ops/sp24.py:155
↓ 1 callers
Function
sparsify24_like
( x: torch.Tensor, pattern: torch.Tensor, gradient: str = GRADIENT_SP24, backend: str = "",
xformers/ops/sp24.py:801
↓ 1 callers
Method
split_kv
(self, tensor: torch.Tensor)
xformers/ops/fmha/attn_bias.py:939
↓ 1 callers
Method
split_queries
(self, tensor: torch.Tensor)
xformers/ops/fmha/attn_bias.py:936
↓ 1 callers
Method
stop
(self, exc_type=None, exc_val=None, exc_tb=None)
xformers/profiler/profiler.py:321
↓ 1 callers
Method
store_line
xformers/csrc/sparse24/warp_tensor.h:52
↓ 1 callers
Method
submit
(self, fn, *args, **kwargs)
tests/multiprocessing_utils.py:155
↓ 1 callers
Function
swiglu
Computes a SwiGLU block given the weights/bias of the 3 linear layers. - It is recommended to keep ``op=None`` so the best implementatio
xformers/ops/swiglu_op.py:185
↓ 1 callers
Function
swiglu_packed
Computes a SwiGLU block given the weights/bias of the 3 linear layers. :Equivalent pytorch code: .. code-block:: python x1
xformers/ops/swiglu_op.py:262
↓ 1 callers
Function
test_slice
(s)
tests/test_unbind.py:79
↓ 1 callers
Method
thread_col
xformers/csrc/sparse24/warp_tensor.h:37
↓ 1 callers
Method
thread_row
xformers/csrc/sparse24/warp_tensor.h:34
↓ 1 callers
Function
tree_attention_with_sync
A wrapper around tree_attention which constructs the biases. Arguments are the same as in xformers.ops.tree_attention.tree_attention, but ins
tests/test_tree_attention.py:347
↓ 1 callers
Function
unbind
Does exactly the same as :attr:`torch.unbind` for the forward. In backward, avoids a :attr:`torch.cat` if the gradients are already multi
xformers/ops/unbind.py:115
↓ 1 callers
Function
undilate
For a given factor, operate on BMHK attention output as follows: If sequence length is M and there are H * factor heads, redi
tests/test_fmha_merge_attentions.py:693
↓ 1 callers
Method
unpack
Unpacks the ScaledTensor by returning its data and scale as a tuple. Returns: - A tuple of (data, scale), both of which are t
xformers/ops/fmha/common.py:109
↓ 1 callers
Function
warp_shuffle_and_write_meta
xformers/csrc/sparse24/sparse24_pack.h:103
↓ 1 callers
Function
warp_shuffle_meta
Each thread has data for an 8x8 area of the input tensor Due to the very specific format of the metadata, 32 consecutive bits of the metadata tensor w
xformers/csrc/sparse24/sparse24_pack.h:45
↓ 1 callers
Function
wavefrontReduce
xformers/csrc/attention/hip_decoder/ck_tile_attention_forward_decoder_splitk.h:32
↓ 1 callers
Function
xf_get_layout
xformers/csrc/pt_stable_utils.h:68
↓ 1 callers
Function
xf_permute
xformers/csrc/pt_stable_utils.h:124
↓ 1 callers
Function
xf_view_dtype
xformers/csrc/pt_stable_utils.h:78
Method
Array<Element, kCols / 32>, // reduce elements uint32_t // thread offset > all_reduce
xformers/csrc/sparse24/warp_tensor.h:252
Method
BlockSize
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:174
Method
CUTLASS_DEVICE operator()
xformers/csrc/sparse24/warp_tensor.h:400
Method
CUTLASS_HOST_DEVICE to_ordered
xformers/csrc/sparse24/compute_sparse_tile.h:19
Method
CUTLASS_HOST_DEVICE to_ordered
xformers/csrc/sparse24/compute_sparse_tile.h:26
Method
GetBlockGemm
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:25
Method
GetTileIndex
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:161
Method
GridSize
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:147
Method
MetadataCuSparseLtSm80
xformers/csrc/sparse24/sparse24_metadata.h:95
Method
MetadataCutlassSm80
xformers/csrc/sparse24/sparse24_metadata.h:188
Method
PB
xformers/csrc/sparse24/static_sort.h:31
Method
PB
xformers/csrc/sparse24/static_sort.h:46
Method
PB
xformers/csrc/sparse24/static_sort.h:53
Method
PB
xformers/csrc/sparse24/static_sort.h:61
Method
PS
xformers/csrc/sparse24/static_sort.h:69
Method
PS
xformers/csrc/sparse24/static_sort.h:79
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_smallq_dispatch.h:64
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_dispatch.h:65
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_smallq_dispatch.h:64
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_dispatch.h:61
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_dispatch.h:51
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_dispatch.h:64
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_dispatch.h:61
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_smallq_dispatch.h:63
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_smallq_dispatch.h:63
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward.h:58
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_dispatch.h:51
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_dispatch.h:65
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_dispatch.h:65
Method
Run
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward.h:58
Method
RunWithBwdConvertQGradKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward.h:302
Method
RunWithBwdConvertQGradKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward.h:317
Method
RunWithBwdDQDKDVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward.h:231
Method
RunWithBwdDQDKDVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward.h:235
Method
RunWithBwdOGradDotOKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward.h:200
Method
RunWithBwdOGradDotOKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward.h:201
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_smallq_dispatch.h:317
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_dispatch.h:227
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_smallq_dispatch.h:211
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_dispatch.h:199
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_smallq_dispatch.h:315
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_smallq_dispatch.h:196
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_dispatch.h:221
Method
RunWithFwdSplitKVKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_dispatch.h:212
Method
RunWithKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_dispatch.h:171
Method
RunWithKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_dispatch.h:119
Method
RunWithKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_dispatch.h:179
Method
RunWithKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_dispatch.h:108
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_smallq_dispatch.h:434
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_splitkv_dispatch.h:344
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_smallq_dispatch.h:328
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_dispatch.h:311
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_smallq_dispatch.h:432
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_splitkv_smallq_dispatch.h:308
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_splitkv_dispatch.h:338
Method
RunWithSplitKVCombineKernel
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_splitkv_dispatch.h:329
Function
STABLE_TORCH_LIBRARY_FRAGMENT
xformers/csrc/attention/attention.cpp:10
← previous
next →
501–600 of 1,445, ranked by callers