MCPcopy Create free account

hub / github.com/facebookresearch/xformers / functions

Functions1,445 in github.com/facebookresearch/xformers

Functiongather_from_sequence_parallel_region
( x: torch.Tensor, process_group: Optional[torch.distributed.ProcessGroup] )
xformers/ops/differentiable_collectives.py:151
Functiongenerate_matching_config
Given a superset of the inputs and a reference config class, return exactly the needed config
xformers/utils.py:68
MethodgetBlocksGrid
xformers/csrc/sparse24/sparse24_pack.h:145
MethodgetMetadataSize
xformers/csrc/sparse24/sparse24_metadata.h:58
MethodgetThreadsGrid
xformers/csrc/sparse24/sparse24_pack.h:152
Functionget_autotuner_cache
Returns a triton.runtime.autotuner.AutoTuner.cache object, which represents mappings from kernel autotune keys (tuples describing kernel input
xformers/ops/fmha/_triton/splitk_kernels.py:683
Functionget_benchmark_names
()
xformers/benchmarks/benchmark_attn_decoding.py:405
Methodget_export_symbols
(self, ext)
setup.py:405
Methodget_ext_filename
(self, ext_name)
setup.py:434
Functionget_full_tree_size
Number of nodes in a full tree of a given depth (including the root node) and branching factor.
xformers/ops/tree_attention.py:691
Methodget_metaN
xformers/csrc/sparse24/sparse24_metadata.h:127
Methodget_metaT
xformers/csrc/sparse24/sparse24_metadata.h:136
Functionget_python_lib
()
xformers/__init__.py:69
Functionget_rank
()
examples/llama_inference/mp_utils.py:90
Functionget_registry_decorator
( class_registry, name_registry, reference_class, default_config )
xformers/utils.py:33
Methodget_tag
(self)
setup.py:386
Methodget_tensor_id
(e)
xformers/checkpoint.py:217
Functionglobal_token_pattern
(attention_query_mask: torch.Tensor)
xformers/components/attention/attention_patterns.py:69
Functiongrid
(meta)
xformers/ops/_triton/k_scaled_index_add.py:146
Functiongrid
(meta)
xformers/ops/_triton/k_index_select_cat.py:61
Functiongrid
(META)
xformers/ops/_triton/tiled_matmul_kernels.py:403
Functionhandle_case
(**case)
xformers/benchmarks/utils.py:717
Methodhip_version
(self)
xformers/_cpp_lib.py:31
Functionhorizontal_axial_2d_distance
(H, W, p=2.0)
xformers/components/attention/attention_patterns.py:98
Functionimport_all_modules
(root: str, base_module: str)
xformers/utils.py:20
Functionindex_select_cat
Indices in ``index`` are assumed to be unique In each (index, source) pair, the max index in ``index`` is assumed to be less than the size of
xformers/ops/indexing.py:215
Functionindex_select_cat_bwd_kernel
( grad_source_ptr, # *Pointer* to grad_source tensor. index_ptr, # *Pointer* to index tensor. gr
xformers/ops/_triton/k_index_select_cat.py:83
Functionindex_select_cat_fwd_kernel
( output_ptr, # *Pointer* to output tensor. source_ptr, # *Pointer* to source tensor. index_ptr,
xformers/ops/_triton/k_index_select_cat.py:12
Functioninitialize
Initialize model parallelism support. Args: world_size (int): the number of processes running on the current node availa
examples/llama_inference/mp_utils.py:18
Functioninner
(x: torch.Tensor)
tests/test_fmha_merge_attentions.py:701
Functioninner_product<bf16_t, bf16_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:63
Functioninner_product<bf16x2_t, bf16x2_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:107
Functioninner_product<bf16x4_t, bf16x4_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:115
Functioninner_product<float, float, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:30
Functioninner_product<fp16_t, fp16_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:71
Functioninner_product<fp16x2_t, fp16x2_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:79
Functioninner_product<fp16x4_t, fp16x4_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:91
Functioninner_product<fp16x8_t, fp16x8_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:99
Functioninner_product<fp32x2_t, fp32x2_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:47
Functioninner_product<fp32x4_t, fp32x4_t, float>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:55
Functioninner_product<int8_t, int8_t, int32_t>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:123
Functioninner_product<int8x16_t, int8x16_t, int32_t>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:160
Functioninner_product<int8x2_t, int8x2_t, int32_t>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:131
Functioninner_product<int8x4_t, int8x4_t, int32_t>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:139
Functioninner_product<int8x8_t, int8x8_t, int32_t>
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:152
Functioninner_product_unrolled
xformers/csrc/attention/hip_decoder/ck_tile_attention_inner_product.h:17
Functioninner_seqpar
( kind: str, step: str, dims: Tuple[int, ...], dtype: torch.dtype, compile: bool, seed
tests/test_seqpar.py:54
Functioninner_sequence_parallel_fused
( seed: int, kind: str, step: str, dims: Tuple[int, ...], dtype: torch.dtype, use_comp
tests/test_sequence_parallel_fused_ops.py:117
Functioninner_sequence_parallel_fused_handle_all_dtypes
( seed: int, step: str, dims: Tuple[int, ...], )
tests/test_sequence_parallel_fused_ops.py:195
Functioninner_test
(present_parent_keys: List[str] = [], absent_parent_keys: List[str] = [])
tests/test_multiprocessing_utils.py:12
Functioninstantiate_and_launch_kernels
xformers/csrc/attention/hip_decoder/attention_forward_splitk.cpp:58
Methodintervals
(self)
xformers/ops/fmha/attn_bias.py:561
Methodintervals
(self)
xformers/ops/fmha/attn_bias.py:704
Functionis_ck_fmha_available
For testing xFormers building and binding
xformers/csrc/attention/hip_fmha/ck_fmha_test.cpp:14
Functionkernel
( x_ptrs: "VAR_ARGS_ARRAY", # noqa: F821 y_ptrs: "VAR_ARGS_ARRAY", # noqa: F821 nume
tests/test_triton_varargs.py:114
Functionlayout_to_pattern
r""" create a pattern of shape [heads, seq, seq] out of a blocksparse layout of shape [heads, seq/block_size, seq/block_size]
xformers/components/attention/attention_patterns.py:263
Functionllama_07B_FFN
(world_size: int)
xformers/benchmarks/benchmark_sequence_parallel_fused.py:76
Functionllama_07B_MHA
(world_size: int)
xformers/benchmarks/benchmark_sequence_parallel_fused.py:66
Functionllama_70B_FFN
(world_size: int)
xformers/benchmarks/benchmark_sequence_parallel_fused.py:97
Functionllama_70B_MHA
(world_size: int)
xformers/benchmarks/benchmark_sequence_parallel_fused.py:87
Methodload_32bits
xformers/csrc/sparse24/warp_tensor.h:63
Methodload_hook
( self, state_dict, prefix, local_metadata, strict, missing_ke
examples/llama_inference/model.py:84
Methodload_hook
( self, state_dict, prefix, local_metadata, strict, missing_ke
examples/llama_inference/model.py:186
Functionload_v
xformers/csrc/attention/hip_decoder/ck_tile_attention_forward_decoder_splitk.h:41
Functionlocal_1d_pattern
(attn_size: int, window_size: int)
xformers/components/attention/attention_patterns.py:84
Functionlocal_2d_distance
(H, W, p=2.0)
xformers/components/attention/attention_patterns.py:108
Functionlocal_2d_gausian_distribution
(H, W, sigma=1)
xformers/components/attention/attention_patterns.py:112
Functionlocal_2d_pattern
(H, W, distance, p=2.0)
xformers/components/attention/attention_patterns.py:116
Methodmain_loop
xformers/csrc/attention/hip_fmha/ck_tiled_rand_uniform_kernel.h:184
Functionmake_cache
Allocate a cache to be used with the Transformer module. Args: args (ModelArgs): the model configuration. length (int): per
examples/llama_inference/model.py:324
Methodmake_local_attention
Create a new bias which combines local + causal attention. See :attr:`LowerTriangularFromBottomRightLocalAttentionMask`
xformers/ops/fmha/attn_bias.py:297
Methodmake_local_attention
( self, window_left: int, window_right: int )
xformers/ops/fmha/attn_bias.py:1193
Methodmake_paged
( self, block_tables: torch.Tensor, page_size: int, paged_type: Type["PagedBlo
xformers/ops/fmha/attn_bias.py:1171
Functionmatches_current
(r)
xformers/benchmarks/utils.py:608
Methodmaterialize
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:238
Methodmaterialize
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:287
Methodmaterialize
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:345
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:816
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:1111
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:1430
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:1553
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:1677
Methodmaterialize
Materialize the attention bias - for debugging & testing
xformers/ops/fmha/attn_bias.py:1736
MethodmdataBlockPtrOffset
xformers/csrc/sparse24/sparse24_metadata.h:260
Functionmem_eff_attention_bw
( shape_q, num_threads: int, attn_bias_cfg, dropout_p, dtype, Hkv=None )
xformers/benchmarks/benchmark_mem_eff_attention.py:266
Functionmem_eff_attention_fw
( shape_q, num_threads: int, attn_bias_cfg, dropout_p, dtype, packed=True, Hkv=Non
xformers/benchmarks/benchmark_mem_eff_attention.py:168
Functionmemory_efficient_attention
Implements the memory-efficient attention mechanism following `"Self-Attention Does Not Need O(n^2) Memory" <http://arxiv.org/abs/2112.05682>`_.
xformers/ops/fmha/__init__.py:199
Functionmemory_efficient_attention_backward
Computes the gradient of the attention. Returns a tuple (dq, dk, dv) See :attr:`xformers.ops.memory_efficient_attention` for an explanati
xformers/ops/fmha/__init__.py:431
Functionmemory_efficient_attention_forward_meta
(q, k, v)
xformers/ops/fmha/__init__.py:332
Functionmemory_efficient_attention_forward_torch_wrapper
This provides a torch-compilable wrapper op to memory_efficient_attention_forward in certain special cases. Note that the following are
xformers/ops/fmha/__init__.py:339
Functionmerge_attentions_varargs
( attn_split: Sequence[torch.Tensor], lse_split: Sequence[torch.Tensor], write_lse: bool, outp
xformers/ops/fmha/triton_splitk.py:1106
Functionmerge_attentions_varargs_backward
( attn_split: List[torch.Tensor], lse_split: List[torch.Tensor], attn_out: torch.Tensor, lse_o
xformers/ops/fmha/triton_splitk.py:1204
Functionmerge_attentions_varargs_backward_fake
( attn_split: List[torch.Tensor], lse_split: List[torch.Tensor], attn_out: torch.Tensor, lse_o
xformers/ops/fmha/triton_splitk.py:1243
Functionmerge_attentions_varargs_fake
( attn_split: Sequence[torch.Tensor], lse_split: Sequence[torch.Tensor], write_lse: bool, outp
xformers/ops/fmha/triton_splitk.py:1158
Functionmha_bwd
( grads_share_storage: bool, dout: torch.Tensor, query: torch.Tensor, key: tor
xformers/ops/fmha/flash3.py:448
Functionmha_bwd_fake
( grads_share_storage: bool, dout: torch.Tensor, query: torch.Tensor, key: tor
xformers/ops/fmha/flash3.py:501
Functionmha_bwd_flops
( grads_share_storage: bool, dout: torch.Tensor, query: torch.Tensor, key: tor
xformers/ops/fmha/flash3.py:521
Functionmha_fwd
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, cu_seqlens_q: O
xformers/ops/fmha/flash3.py:225
Functionmha_fwd_fake
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, cu_seqlens_q: O
xformers/ops/fmha/flash3.py:327
Functionmy_gi_and_w_matmul
( grad_gathered_outputs_shard: List[torch.Tensor], src_rank: int, stream_f
xformers/ops/seqpar.py:287
← previousnext →901–1,000 of 1,445, ranked by callers