MCPcopy Create free account

hub / github.com/facebookresearch/xformers / functions

Functions1,445 in github.com/facebookresearch/xformers

↓ 1 callersFunctionget_global_pool_allocator
( world_size: int, )
tests/multiprocessing_utils.py:121
↓ 1 callersFunctionget_hip_version
(rocm_dir)
setup.py:111
↓ 1 callersMethodget_inputs
(self)
xformers/benchmarks/benchmark_attn_decoding.py:149
↓ 1 callersMethodget_kernel
(cls)
xformers/ops/fmha/triton_splitk.py:383
↓ 1 callersFunctionget_local_version_suffix
()
setup.py:78
↓ 1 callersFunctionget_measurement_id
(r)
xformers/benchmarks/utils.py:652
↓ 1 callersMethodget_metaN
xformers/csrc/sparse24/sparse24_metadata.h:216
↓ 1 callersMethodget_metaT
xformers/csrc/sparse24/sparse24_metadata.h:226
↓ 1 callersFunctionget_mtile_size_for_splitkv
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_splitkv_setting.h:159
↓ 1 callersFunctionget_num_kv_splits_heuristic
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_splitkv_selector.h:29
↓ 1 callersMethodget_operator
( cls, splitk: int, *, block_m: Optional[int] = None, block_n: Optiona
xformers/ops/fmha/triton_splitk.py:1016
↓ 1 callersMethodget_output_dtype
(self)
xformers/ops/fmha/common.py:327
↓ 1 callersMethodget_padded_lse
(self, pad_to: int, force_pad_inf: bool = False)
xformers/ops/fmha/common.py:354
↓ 1 callersMethodget_policy_fn
(self, *args, **kwargs)
xformers/checkpoint.py:515
↓ 1 callersMethodget_profilable_fields
(self)
xformers/profiler/profiler_dcgm_impl.py:96
↓ 1 callersFunctionget_prompts
(interactive: bool)
examples/llama_inference/generate.py:207
↓ 1 callersFunctionget_simd_tflops
return compute throughput in TOPS
xformers/ops/_triton/matmul_perf_model.py:70
↓ 1 callersFunctionget_slopes
(n: int)
xformers/components/attention/attention_patterns.py:226
↓ 1 callersFunctionget_slopes_power_of_2
(n: int)
xformers/components/attention/attention_patterns.py:227
↓ 1 callersMethodget_split_k
Heuristic for the number of splits
xformers/ops/fmha/ck_splitk.py:95
↓ 1 callersMethodget_split_k
Heuristic for the number of splits
xformers/ops/fmha/triton_splitk.py:337
↓ 1 callersFunctionget_stack_strides
If the tensors are already stacked on dimension :code:`dim`, \ returns the strides of the stacked tensors. \ Otherwise returns :c
xformers/ops/unbind.py:13
↓ 1 callersFunctionget_supported_attn_bias_types
(op)
tests/test_fmha_merge_attentions.py:38
↓ 1 callersFunctionget_tensorcore_tflops
return compute throughput in TOPS
xformers/ops/_triton/matmul_perf_model.py:56
↓ 1 callersFunctionget_tflops
(device, num_ctas, num_warps, dtype)
xformers/ops/_triton/matmul_perf_model.py:84
↓ 1 callersMethodgrid
(META)
xformers/ops/fmha/triton_splitk.py:834
↓ 1 callersFunctiongrouped_backward_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward_bf16.cpp:16
↓ 1 callersFunctiongrouped_backward_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_backward_fp16.cpp:16
↓ 1 callersFunctiongrouped_forward_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_bf16.cpp:16
↓ 1 callersFunctiongrouped_forward_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_forward_fp16.cpp:16
↓ 1 callersFunctiongrouped_infer_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_bf16.cpp:15
↓ 1 callersFunctiongrouped_infer_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_grouped_infer_fp16.cpp:15
↓ 1 callersMethodincrement_and_forward_
An addition fused with forward. z = layer.increment_and_forward_(x, y) is equivalent to x += y
xformers/ops/rmsnorm.py:102
↓ 1 callersFunctionindex_select_cat_bwd
( grad_source: torch.Tensor, index: torch.Tensor, grad_output: torch.Tensor, )
xformers/ops/_triton/k_index_select_cat.py:126
↓ 1 callersFunctionindex_select_cat_fwd
( output: torch.Tensor, source: torch.Tensor, index: torch.Tensor, )
xformers/ops/_triton/k_index_select_cat.py:38
↓ 1 callersFunctioninit_process_group
(init_method: str, rank: int, world_size: int)
tests/multiprocessing_utils.py:69
↓ 1 callersFunctioninit_to_zero
(*names)
xformers/ops/_triton/tiled_matmul_kernels.py:20
↓ 1 callersFunctioninner
(seqpos, *, first_seqpos_input=None, seqpos_input=None)
tests/test_rope_padded.py:319
↓ 1 callersFunctionjournalized_fn
(d: list[str], n: str, x: torch.Tensor)
tests/test_fwbw_overlap.py:34
↓ 1 callersMethodlinear_and_reducescatter
Perform a fused linear layer followed by a reduce-scatter
xformers/ops/sequence_parallel_fused_ops.py:209
↓ 1 callersFunctionlist_operators
Returns the list of operators used inside `function` with *args and **kwargs
xformers/checkpoint.py:109
↓ 1 callersFunctionload_dequantize_k_v_group
Load K/V for a given block. In case of int4/fp8-quantized K/V, dequantize them after loading. If quantization is group-wise, use group_id to advan
xformers/ops/fmha/_triton/splitk_kernels.py:699
↓ 1 callersFunctionlocal_nd_gaussian_distribution
(*sizes, sigma=1)
xformers/components/attention/attention_patterns.py:31
↓ 1 callersFunctionmain
()
xformers/benchmarks/benchmark_merge_attentions.py:80
↓ 1 callersFunctionmain
run performance benchmark
xformers/benchmarks/benchmark_attn_decoding.py:453
↓ 1 callersFunctionmain
()
xformers/benchmarks/benchmark_sequence_parallel_fused.py:422
↓ 1 callersFunctionmain
()
xformers/benchmarks/benchmark_mem_eff_attention.py:343
↓ 1 callersFunctionmain
(ckpt_dir: str, interactive: bool, add_instruction_tags: bool)
examples/llama_inference/generate.py:224
↓ 1 callersFunctionmake_id
(op, device, dtype, bias_type, *shape)
tests/test_mem_eff_attention.py:214
↓ 1 callersMethodmake_local_attention_from_bottomright
Experimental: Makes each block causal with local attention, start from bottom right
xformers/ops/fmha/attn_bias.py:981
↓ 1 callersFunctionmake_operands
Produce lhs, rhs and reference output tensors To dodge numerical accuracy differences between our kernels and PyTorch's ones, we avoid random
tests/test_tiled_matmul.py:55
↓ 1 callersFunctionmask_non_zeros
(s_q: int, s_k: int, window_left: int, window_right: int)
xformers/ops/fmha/flash3.py:151
↓ 1 callersFunctionmasked_matmul
(a, b, mask=None)
xformers/ops/__init__.py:44
↓ 1 callersMethodmaterialize
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:372
↓ 1 callersFunctionmatmul_per_tile
(a, b)
xformers/benchmarks/benchmark_tiled_matmul.py:53
↓ 1 callersFunctionmaybe_contiguous
(x: T)
xformers/ops/fmha/flash3.py:65
↓ 1 callersFunctionmaybe_use_cpu_ref
(fn)
tests/utils.py:48
↓ 1 callersFunctionmemory_efficient_attention_forward
Calculates the forward pass of :attr:`xformers.ops.memory_efficient_attention`.
xformers/ops/fmha/__init__.py:367
↓ 1 callersFunctionmemory_efficient_attention_forward_requires_grad
Returns a tuple (output, lse), where `lse` can be used to compute the backward pass later. See :attr:`xformers.ops.memory_efficient_attention
xformers/ops/fmha/__init__.py:395
↓ 1 callersFunctionmemory_efficient_attention_partial
Returns a tuple (output, lse), where `output` is the attention in the style of memory_efficient_attention, and `lse` is extra data, a log-su
xformers/ops/fmha/__init__.py:597
↓ 1 callersFunctionmerge_attentions
Combine attention output computed on different parts of K/V for the same query to get attention on the whole K/V. See https://arxiv.org/abs/2
xformers/ops/fmha/__init__.py:638
↓ 1 callersFunctionmerge_attentions
( attn_out: torch.Tensor, lse_out: Optional[torch.Tensor], attn_split: torch.Tensor, lse_split
xformers/ops/fmha/triton_splitk.py:1047
↓ 1 callersFunctionmeta_str
(m)
tests/test_sparsity24.py:329
↓ 1 callersFunctionmha_fwd_flops
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, cu_seqlens_q: O
xformers/ops/fmha/flash3.py:365
↓ 1 callersFunctionmy_chunk
(t, *, dim)
tests/test_seqpar.py:91
↓ 1 callersFunctionnanify_oob_seqlen
(x: torch.Tensor)
tests/test_mem_eff_attention.py:497
↓ 1 callersFunctionno_dispatch
()
xformers/ops/sp24.py:228
↓ 1 callersFunctionnot_stacked
(t, d)
tests/test_unbind.py:55
↓ 1 callersMethodnot_supported_reasons
(cls, d: Inputs)
xformers/ops/fmha/flash.py:603
↓ 1 callersMethodnot_supported_reasons
(cls, d: Inputs)
xformers/ops/fmha/flash3.py:648
↓ 1 callersMethodnot_supported_reasons
(cls, d: Inputs)
xformers/ops/fmha/cutlass_blackwell.py:267
↓ 1 callersMethodnot_supported_reasons
(cls, d: Inputs)
xformers/ops/fmha/cutlass.py:317
↓ 1 callersFunctionone_step
(model)
tests/test_profiler.py:72
↓ 1 callersMethodop
Computes the best operator Returns: SwiGLUOp: The best operator for the configuration
xformers/ops/swiglu_op.py:139
↓ 1 callersFunctionpack
(line)
tests/test_sparsity24.py:313
↓ 1 callersFunctionpack_fp8_tensorwise_per_head
Pack a tensor into a tensorwise fp8 ScaledTensor.
xformers/ops/fmha/common.py:124
↓ 1 callersMethodpad_bias
(bias: torch.Tensor)
tests/test_mem_eff_attention.py:1912
↓ 1 callersMethodphase
Start a new phase, and terminate the current one, if one is ongoing.
examples/llama_inference/stats.py:50
↓ 1 callersFunctionpretty_plot
Graph out the contents of a dict. Dash key means that if the result label has this key, then it will be displayed with a dash
xformers/benchmarks/utils.py:79
↓ 1 callersFunctionpretty_print
Printout the contents of a dict as a human-readable and Markdown compatible array
xformers/benchmarks/utils.py:53
↓ 1 callersMethodprint
xformers/csrc/sparse24/warp_tensor.h:143
↓ 1 callersFunctionprint_info
()
xformers/info.py:25
↓ 1 callersFunctionprint_json_as_dataframe
(json_list)
xformers/profiler/find_slowest.py:17
↓ 1 callersFunctionprint_profiling_info
(cuda_profile_dir: str)
xformers/profiler/find_slowest.py:116
↓ 1 callersFunctionproduct_dict
(**kwargs)
xformers/benchmarks/benchmark_tiled_matmul.py:34
↓ 1 callersFunctionproduct_dict
(**kwargs)
xformers/benchmarks/benchmark_mem_eff_attention.py:80
↓ 1 callersFunctionquantize_fp8_asymmetric
( x: torch.Tensor, pt_fp8_dtype: torch.dtype = torch.float8_e4m3fn, )
tests/utils.py:320
↓ 1 callersFunctionquantize_kv_int4
Auxiliary int4 row quantization function used for benchmarking and tests. Matches the behaviour of torch.ops.llama_cpp.dequantize_int4_cache
xformers/benchmarks/benchmark_attn_decoding.py:38
↓ 1 callersFunctionread_one_file
(profile_trace_path: str)
xformers/profiler/find_slowest.py:80
↓ 1 callersFunctionreduce_from_model_parallel_region
( x: torch.Tensor, process_group: Optional[torch.distributed.ProcessGroup] )
xformers/ops/differentiable_collectives.py:123
↓ 1 callersFunctionref_attention_bmhk
(q, k, v, attn_bias, scale=None)
xformers/attn_bias_utils.py:432
↓ 1 callersFunctionref_attention_splitk_bmhk
( q, k, v, attn_bias, scale=None, split_k=None, dtype=None )
tests/test_splitk_reference.py:18
↓ 1 callersFunctionref_tree_attention
( q: torch.Tensor, spec_k: torch.Tensor, spec_v: torch.Tensor, cache_k: torch.Tensor, cach
tests/test_tree_attention.py:293
↓ 1 callersFunctionreference_leading
(input_, w1, w2)
tests/test_seqpar.py:31
↓ 1 callersFunctionreference_trailing
(hidden, w)
tests/test_seqpar.py:37
↓ 1 callersFunctionrename_cpp_cu
(cpp_files)
setup.py:128
↓ 1 callersMethodresult
()
xformers/ops/sequence_parallel_fused_ops.py:92
↓ 1 callersFunctionrmf
Remove a file like rm -f.
xformers/benchmarks/utils.py:211
↓ 1 callersFunctionrms_norm
RMS Normalization along the last dimension. This is similar to torch.nn.functional.normalize but with eps being added instead of max.
xformers/ops/rmsnorm.py:13
↓ 1 callersFunctionrms_norm_add
An addition fused with rms_norm. z = rms_norm_add(x, y, weight, eps) is equivalent to x += y z = rms_norm(x, weigh
xformers/ops/rmsnorm.py:42
← previousnext →401–500 of 1,445, ranked by callers