MCPcopy Create free account

hub / github.com/facebookresearch/xformers / functions

Functions1,445 in github.com/facebookresearch/xformers

↓ 1 callersFunction_should_use_triton
(device: torch.device, dtype: torch.dtype)
xformers/ops/tiled_matmul.py:16
↓ 1 callersMethod_silu_backward
(dy, x)
xformers/ops/swiglu_op.py:32
↓ 1 callersFunction_slice
(partial: Partial, a: int, b: int)
tests/test_fmha_merge_attentions.py:633
↓ 1 callersFunction_slow_rope
Simple rope calculation of rope of one tensor Args: x: input, shape (B, M, H, K). seqpos: gives the position of each sequenc
tests/test_rope_padded.py:53
↓ 1 callersFunction_softmax
(layout, values)
xformers/sparse/blocksparse_tensor.py:40
↓ 1 callersMethod_softmax
(cls, arg0, dim)
xformers/sparse/blocksparse_tensor.py:141
↓ 1 callersFunction_spmm
(b, layout, values)
xformers/sparse/blocksparse_tensor.py:16
↓ 1 callersFunction_stack_fw
( tensors: Union[Tuple[torch.Tensor, ...], List[torch.Tensor]], dim: int, )
xformers/ops/unbind.py:71
↓ 1 callersMethod_to
(cls, arg0, device)
xformers/sparse/blocksparse_tensor.py:148
↓ 1 callersMethod_to_dense
(cls, arg0)
xformers/sparse/blocksparse_tensor.py:181
↓ 1 callersFunction_to_expanded_shape
(x)
tests/utils.py:175
↓ 1 callersFunction_to_packed_expanded_shape
(x)
tests/utils.py:276
↓ 1 callersFunction_transpose_with_info
(values, _transpose_info)
xformers/sparse/utils.py:48
↓ 1 callersMethod_tuple
(self)
xformers/ops/fmha/merge_training.py:161
↓ 1 callersFunction_unserialize_op
(op)
xformers/ops/fmha/__init__.py:77
↓ 1 callersFunction_uses_tensorcores
(sm: int, is_half: bool)
xformers/ops/fmha/cutlass.py:40
↓ 1 callersFunction_vec_binom_test
vectorized implementation of scipy.stats.binom_test this makes our tests much faster reference: https://github.com/scipy/scipy/blob/v1.8.
tests/test_mem_eff_attention.py:948
↓ 1 callersFunction_vertical_axial_2d_distance
(H, W, p=2.0)
tests/test_attention_patterns.py:43
↓ 1 callersMethodadd_bias
Creates a new causal mask with an arbitrary ``torch.Tensor`` bias
xformers/ops/fmha/attn_bias.py:168
↓ 1 callersMethodallgather_and_linear
Perform a fused all-gather followed by a linear layer
xformers/ops/sequence_parallel_fused_ops.py:100
↓ 1 callersMethodapply
( cls, inp: Inputs, needs_gradient: bool, use_kvsplit: bool = False, )
xformers/ops/fmha/flash3.py:666
↓ 1 callersMethodapply_bmhk
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/ck.py:280
↓ 1 callersMethodapply_bmhk
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/cutlass.py:266
↓ 1 callersFunctionapply_scaling
( freqs: torch.Tensor, old_context_len: float, low_freq_factor: float, high_freq_factor: float
tests/test_rope_padded.py:26
↓ 1 callersFunctionasync_bw
You can wait for the backward to finish with `done_semaphore.acquire()`
xformers/fwbw_overlap.py:387
↓ 1 callersFunctionattn_bias_group
(group: int)
xformers/attn_bias_utils.py:377
↓ 1 callersFunctionattn_bias_group
(group: int)
tests/test_splitk_reference.py:47
↓ 1 callersFunctionautotune_kernel
(kernel: Callable)
xformers/ops/fmha/_triton/splitk_kernels.py:643
↓ 1 callersFunctionaxial_nd_pattern
(*sizes)
xformers/components/attention/attention_patterns.py:42
↓ 1 callersFunctionbatched_backward_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward_bf16.cpp:16
↓ 1 callersFunctionbatched_backward_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_backward_fp16.cpp:16
↓ 1 callersFunctionbatched_forward_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_bf16.cpp:16
↓ 1 callersFunctionbatched_forward_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_fp16.cpp:16
↓ 1 callersFunctionbatched_infer_bf16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_bf16.cpp:15
↓ 1 callersFunctionbatched_infer_fp16
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_infer_fp16.cpp:15
↓ 1 callersFunctionbenchmark_merge_attentions_backward
Benchmark backward pass for merge_attentions. Assumes "varargs" path, i.e. LSE and attention of chunks are provided as two lists of tensors,
xformers/benchmarks/benchmark_merge_attentions.py:34
↓ 1 callersFunctionbenchmark_run_and_compare
( benchmark_fn, cases: List[Dict[str, Any]], compare: List[str], omit_baselines: bool = False,
xformers/benchmarks/utils.py:463
↓ 1 callersFunctionbmk2bmhk
(tensor, num_heads: int)
xformers/ops/fmha/common.py:570
↓ 1 callersMethodbuild
Load a Llama or Code Llama checkpoint and return a new generator for this model.
examples/llama_inference/generate.py:42
↓ 1 callersFunctionbuild_module
()
tests/test_checkpoint.py:45
↓ 1 callersMethodbw
(self)
xformers/benchmarks/benchmark_sp24.py:72
↓ 1 callersFunctioncast_uint32_to_float
Extract two float16 packed into one int32 as float32
xformers/ops/fmha/_triton/splitk_kernels.py:794
↓ 1 callersFunctioncast_uint32_to_half2
Extract two float16 packed into one int32
xformers/ops/fmha/_triton/splitk_kernels.py:784
↓ 1 callersFunctionceil_of_ratio
(n, k)
tests/test_tiled_matmul.py:51
↓ 1 callersFunctioncheck_output
(out: List[List[torch.Tensor]], ms: List[int], ns: List[int])
xformers/ops/tiled_matmul.py:95
↓ 1 callersMethodcheck_schedule
(self, schedule: Sequence[Tuple[Any, int, int]])
xformers/profiler/profiler.py:257
↓ 1 callersFunctioncompute_attention_split
(q_whole, k_slice, v_slice, attn_bias_slice)
tests/test_splitk_reference.py:112
↓ 1 callersMethodcompute_hfu
(self, hardware_flops: Dict[torch.dtype, float])
xformers/profiler/profile_analyzer.py:135
↓ 1 callersMethodcompute_mfu
(self, hardware_flops: Dict[torch.dtype, float])
xformers/profiler/profile_analyzer.py:141
↓ 1 callersFunctioncompute_std_dev_of_event_durations_over_ranks
(events, top=5)
xformers/profiler/find_slowest.py:44
↓ 1 callersFunctionconstruct_fp8_attention_inputs
Construct inputs for benchmarks and tests of Triton Split-k attention with fused row-wise FP8 dequantization. Quantization coefficients a
tests/utils.py:134
↓ 1 callersFunctionconstruct_full_tree_choices
Construct a full tree of a given depth where each node (except for leaves) has a given number of children. The format is compatible with that
xformers/ops/tree_attention.py:666
↓ 1 callersFunctioncopy_to_model_parallel_region
( x: torch.Tensor, process_group: Optional[torch.distributed.ProcessGroup] )
xformers/ops/differentiable_collectives.py:99
↓ 1 callersFunctioncreate_backward_instances
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:271
↓ 1 callersFunctioncreate_backward_instances_ref
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:315
↓ 1 callersMethodcreate_dcgm_group
( self, gpus_to_profile: Union[Tuple[int], Tuple[int, ...]] )
xformers/profiler/profiler_dcgm_impl.py:65
↓ 1 callersFunctioncreate_forward_instances
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:198
↓ 1 callersFunctioncreate_forward_instances_ref
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:236
↓ 1 callersFunctioncreate_infer_instances
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:127
↓ 1 callersFunctioncreate_infer_instances_ref
(instance_dir: Path, headdims: List)
xformers/csrc/attention/hip_fmha/generate_instances.py:165
↓ 1 callersMethodcreate_profiling_field_group
( self, fieldIdsToProfile: Optional[Tuple[int, ...]], )
xformers/profiler/profiler_dcgm_impl.py:107
↓ 1 callersFunctiondequant_cache
(x)
tests/test_mem_eff_attention.py:1728
↓ 1 callersFunctiondequantize
PACKED_PER_VAL is the number of values packed into each element x_. For example, for int4 quantization and x_ of type int32, PACKED_PER_VAL is 8.
xformers/ops/fmha/_triton/splitk_kernels.py:852
↓ 1 callersMethoddequantize
Applies the custom dequantization function provided at the tensor's creation. After dequantization, the data is cast back to its orig
xformers/ops/fmha/common.py:95
↓ 1 callersFunctiondequantize_fp8_asymmetric
( x: torch.Tensor, scale: torch.Tensor, shift: torch.Tensor )
tests/utils.py:337
↓ 1 callersFunctiondequantize_k_hip
PACKED_PER_VAL is the number of values packed into each element x_. For example, for int4 quantization and x_ of type int32, PACKED_PER_VAL is 8.
xformers/ops/fmha/_triton/splitk_kernels.py:804
↓ 1 callersFunctiondisable_tf32
(fn)
tests/utils.py:79
↓ 1 callersFunctionearly_config_prune
(configs, named_args, **kwargs)
xformers/ops/_triton/matmul_perf_model.py:173
↓ 1 callersFunctionensure_pt_flash_ok
Raises an ImportError if the current PyTorch version has an unexpected Flash-Attention.
xformers/ops/fmha/torch_attention_compat.py:62
↓ 1 callersFunctionenter_comm
( *tensors: torch.Tensor, name: str = "comm", )
xformers/fwbw_overlap.py:242
↓ 1 callersFunctionenter_compute
( __overlap_holder: EventOverlapHolder, __tensor0: torch.Tensor, __tensor1: torch.Tensor, *ten
xformers/fwbw_overlap.py:253
↓ 1 callersFunctionestimate_matmul_time
return estimated running time in ms = max(compute, loading) + store
xformers/ops/_triton/matmul_perf_model.py:91
↓ 1 callersFunctionexpect_match
(i, j, line)
tests/test_sparsity24.py:332
↓ 1 callersFunctionfa3_available
()
xformers/ops/fmha/dispatch.py:32
↓ 1 callersFunctionfetch_requirements
()
setup.py:72
↓ 1 callersFunctionfmha_fn
(q, k, v, bias)
tests/test_mem_eff_attention.py:2784
↓ 1 callersFunctionfold
(x)
xformers/ops/fmha/flash.py:390
↓ 1 callersMethodformat_summary
(self)
xformers/profiler/profiler.py:369
↓ 1 callersMethodforward
( self, x: torch.Tensor, cache: LayerCache, attn_bias: AttnBias, posit
examples/llama_inference/model.py:100
↓ 1 callersFunctionfp8_per_head_quantize
( x: torch.Tensor, dtype_fp8: torch.dtype, )
tests/test_mem_eff_attention.py:2882
↓ 1 callersMethodfrom_arguments
( x: torch.Tensor, w1: torch.Tensor, b1: Optional[torch.Tensor], w2: torch.Ten
xformers/ops/swiglu_op.py:148
↓ 1 callersMethodfrom_seqlens_local
( cls, q_seqlen: Sequence[int], kv_padding: int, kv_seqlen: Sequence[int],
xformers/ops/fmha/attn_bias.py:1322
↓ 1 callersMethodfw
(self)
xformers/benchmarks/benchmark_attn_decoding.py:336
↓ 1 callersMethodfw
(self)
xformers/benchmarks/benchmark_sp24.py:65
↓ 1 callersFunctiongen_config
A more compact way to define a triton.Config, so it fits on one line
xformers/ops/_triton/tiled_matmul_kernels.py:28
↓ 1 callersFunctiongen_config
A more compact way to define a triton.Config, so it fits on one line
xformers/ops/fmha/_triton/splitk_kernels.py:589
↓ 1 callersMethodgenerate_all
( self, prompts: list[list[int]], use_cuda_graphs: bool )
examples/llama_inference/generate.py:100
↓ 1 callersFunctiongenerate_splits_list
generate a list of numbers as num_splits to consider, the list of numbers is like 1, 2, 4, 8, 16, 32, 64, 96, 128, 160
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_splitkv_selector.h:19
↓ 1 callersFunctiongenerate_test_shapes
(*repeats, num_shapes=5)
tests/test_tiled_matmul.py:31
↓ 1 callersFunctiongenerate_test_shapes_B_Mq_Mkv_H_K_Kv
(op)
tests/test_mem_eff_attention.py:143
↓ 1 callersFunctiongenerate_version_py
(version: str)
setup.py:89
↓ 1 callersFunctionget_bias_grad
(attn_bias, clear: bool = False)
tests/test_mem_eff_attention.py:355
↓ 1 callersFunctionget_cuda_version
(cuda_dir)
setup.py:98
↓ 1 callersFunctionget_device_limits
Currently only implemented for GPUs
xformers/profiler/device_limits.py:104
↓ 1 callersFunctionget_extensions
()
setup.py:133
↓ 1 callersMethodget_extra_args
( cls, *, is_paged: bool, B: int, M: int, Kkv: int, Kq
xformers/ops/fmha/triton_splitk.py:415
↓ 1 callersFunctionget_extra_nvcc_flags_for_build_type
(cuda_version: int)
setup.py:54
↓ 1 callersFunctionget_features_status
()
xformers/info.py:16
↓ 1 callersFunctionget_fmha_fwd_least_mtile
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_fwd_setting.h:195
↓ 1 callersMethodget_fp8_scale_shift
( cls, inp: Inputs )
xformers/ops/fmha/triton_splitk.py:395
← previousnext →301–400 of 1,445, ranked by callers