MCPcopy Create free account

hub / github.com/facebookresearch/xformers / functions

Functions1,445 in github.com/facebookresearch/xformers

Method__tensor_flatten__
(self)
xformers/ops/sp24.py:348
Method__tensor_unflatten__
( cls, inner_tensors, flatten_spec, outer_size, outer_stride )
xformers/ops/sp24.py:352
Method__torch_dispatch__
(self, func, types, args=(), kwargs=None)
xformers/checkpoint.py:102
Method__torch_dispatch__
(self, func, types, args=(), kwargs=None)
xformers/checkpoint.py:138
Method__torch_dispatch__
(self, func, types, args=(), kwargs=None)
xformers/checkpoint.py:245
Method__torch_dispatch__
( cls, func: Any, types: Any, args: Any = (), kwargs: Any = None )
xformers/fwbw_overlap.py:107
Method__torch_dispatch__
(cls, func, types, args=(), kwargs=None)
xformers/ops/sp24.py:392
Method__torch_dispatch__
(cls, func, types, args=(), kwargs=None)
xformers/ops/sp24.py:548
Method__torch_dispatch__
(cls, func, types, args, kwargs)
xformers/sparse/blocksparse_tensor.py:277
Method__torch_function__
(cls, func, types, args=(), kwargs=None)
xformers/sparse/blocksparse_tensor.py:200
Function_all_policy
(ctx, func, *args, **kwargs)
tests/test_checkpoint.py:36
Method_analyze_trace
(self, prof: torch.profiler.profiler.profile)
xformers/profiler/profiler.py:155
Function_bias_enabled
(op: SwiGLUOpDispatch)
xformers/ops/swiglu_op.py:170
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1012
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1064
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1235
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1311
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1370
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1901
Method_create_block_mask
( self, shape: Tuple[int, ...], dtype: torch.dtype = torch.float32, device: Un
xformers/ops/fmha/attn_bias.py:1949
Function_cusplt_mm
This operator wraps find_algo + gemm. This is because we don't want find_algo to be visible by torch compile, otherwise it will remove it fro
xformers/ops/sp24.py:463
Function_cusplt_mm_meta
( shape: List[int], packed: torch.Tensor, B: torch.Tensor, bias: Optional[torch.Tensor], t
xformers/ops/sp24.py:483
Function_default_policy
(ctx, func, *args, **kwargs)
xformers/checkpoint.py:92
Function_default_stream_factory
()
xformers/ops/sequence_parallel_fused_ops.py:374
Function_dense3d_to_sparse
(matrix, device)
xformers/sparse/utils.py:108
Function_dense_to_sparse
Converts dense 2d matrix to a csr sparse matrix.
xformers/sparse/utils.py:83
Function_eager_functional_swiglu
( x: torch.Tensor, w1: torch.Tensor, b1: Optional[torch.Tensor], w2: torch.Tensor, b2: Opt
xformers/ops/swiglu_op.py:111
Function_flash_bwd
( grads_share_storage: bool, grad: torch.Tensor, query: torch.Tensor, key: tor
xformers/ops/fmha/flash.py:211
Function_flash_bwd_abstract
( grads_share_storage, grad, query, key, value, *args,
xformers/ops/fmha/flash.py:309
Function_flash_fwd
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, cu_seqlens_q: O
xformers/ops/fmha/flash.py:92
Function_flash_fwd_abstract
( query, key, value, cu_seqlens_q, cu_seqlens_k, seqused_k,
xformers/ops/fmha/flash.py:177
Function_fused_allgather_and_linear_custom_op
( scattered_input: torch.Tensor, weights: List[torch.Tensor], process_group_name: dist.distributed
xformers/ops/sequence_parallel_fused_ops.py:522
Function_fused_linear_and_reducescatter_custom_op
( gathered_input: torch.Tensor, weights: List[torch.Tensor], process_group_name: dist.distributed_
xformers/ops/sequence_parallel_fused_ops.py:749
Function_fwd_kernel_splitK
This kernel can accept non-quantized or int4-quantized keys/values. PACKED_PER_VAL determines the quantization type: - PACKED_PER_VAL == 1
xformers/ops/fmha/_triton/splitk_kernels.py:31
Method_get_meta_offset
xformers/csrc/sparse24/sparse24_metadata.h:105
Method_get_meta_offset
xformers/csrc/sparse24/sparse24_metadata.h:198
Method_has_trace_plot
(self)
xformers/profiler/profiler.py:170
Function_kv_heads_label
(kv_heads: Optional[int])
tests/test_splitk_reference.py:157
Function_kv_heads_label
(kv_heads: Optional[int])
tests/test_mem_eff_attention.py:1647
Function_launch_subprocesses_fn_wrapper
( init_method: str, rank: int, world_size: int, parent_env_vars: Dict[str, str], user_fn,
tests/multiprocessing_utils.py:87
Function_merge_attentions_backward
( ctx: torch.autograd.function.FunctionCtx, grad: List[torch.Tensor], )
xformers/ops/fmha/triton_splitk.py:1184
Method_mm
( self, B: torch.Tensor, *, bias: Optional[torch.Tensor] = None, prefe
xformers/ops/sp24.py:364
Method_mm
( self, B: torch.Tensor, *, prefer_col_major_output: bool = False, bia
xformers/ops/sp24.py:498
Function_monkey_patched_getlines
(filename, module_globals=None)
xformers/triton/vararg_kernel.py:173
Method_on_trace
(self, prof: torch.profiler.profiler.profile)
xformers/profiler/profiler.py:74
Function_rand_partition
(r: random.Random, total: int, n: int)
tests/test_mem_eff_attention.py:346
Function_relu_policy
(ctx, func, *args, **kwargs)
tests/test_checkpoint.py:32
Function_rms_norm_add_kernel
( x_ptr, y_ptr, h1_ptr, w_ptr, eps, stride, N_COLS: tl.constexpr, BLOCK_SIZE:
xformers/ops/_triton/rmsnorm_kernels.py:51
Function_rms_norm_kernel
( x_ptr, h1_ptr, w_ptr, eps, stride, N_COLS: tl.constexpr, BLOCK_SIZE: tl.constexp
xformers/ops/_triton/rmsnorm_kernels.py:15
Function_rope_padded_kernel
Each letter in this diagram is a whole row of length dim. INPUT xq xk xv head_dim ─► batch qqqqqq
xformers/ops/_triton/rope_padded_kernels.py:14
Function_set_use_fa3
(use_flash_attention3: bool)
xformers/ops/fmha/dispatch.py:22
Function_splitK_reduce
( Out_splitK, # [B, G, H, split_k, Mq, K] LSE_splitK, # [B, G, H, split_k, Mq] Out, # [B, H, M,
xformers/ops/fmha/_triton/splitk_kernels.py:908
Function_splitK_reduce_varargs
This version of reduce kernel takes attention and LSE of chunks as lists of tensors, as opposed to _splitK_reduce, which takes each as a stac
xformers/ops/fmha/_triton/splitk_kernels.py:1024
Function_splitK_reduce_varargs_backward
Backward for _splitK_reduce_varargs. Similar to forward, it takes attention and LSE of chunks as lists of tensors, and outputs the corres
xformers/ops/fmha/_triton/splitk_kernels.py:1136
Function_transpose
(m, n, row_indices, values, row_offsets, column_indices)
xformers/sparse/utils.py:54
Function_xformers_tiled_matmul_kernel
( A11, A12, A13, A21, A22, A23, A31, A32, A33, B11, B12, B13,
xformers/ops/_triton/tiled_matmul_kernels.py:158
Functionalibi_pattern
r""" Use the additive bias computation from ALiBi_ to generate a mask. Note that this mask can in turn be used to generate a blocksparse atten
xformers/components/attention/attention_patterns.py:214
Functionall_gather
Gather a tensor of shape (n, m) into a tensor of shape (n, mp_size * m).
examples/llama_inference/mp_utils.py:96
Functionall_reduce
(x: torch.Tensor)
examples/llama_inference/mp_utils.py:110
Functionallow_in_graph
(func: F)
xformers/ops/sp24.py:769
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/ck.py:432
Methodapply
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/flash.py:614
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/flash.py:747
Methodapply
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/common.py:521
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/common.py:561
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/flash3.py:812
Methodapply
( # type: ignore[override] cls, inp: Inputs, needs_gradient: bool, )
xformers/ops/fmha/flash3.py:901
Methodapply
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/cutlass_blackwell.py:301
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/cutlass_blackwell.py:418
Methodapply
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/ck_splitk.py:107
Methodapply
( cls, inp: Inputs, needs_gradient: bool )
xformers/ops/fmha/cutlass.py:202
Methodapply
(cls, ctx: Context, inp: Inputs, grad: torch.Tensor)
xformers/ops/fmha/cutlass.py:400
Methodapply
Note that inp can be of type InputsFp8, in which case K/V are assumed to be row-wise FP8-quantized. This is different from int4 quant
xformers/ops/fmha/triton_splitk.py:606
Functionapply_attention
(query, key, value, attn_bias, op_fw, proj)
tests/test_mem_eff_attention.py:1283
Functionattn_via_Partial
(q_, k_, v_)
tests/test_fmha_merge_attentions.py:602
Functionaxial_2d_pattern
(H, W)
xformers/components/attention/attention_patterns.py:120
Methodbackward
( # type: ignore ctx: torch.autograd.function.FunctionCtx, gholder: Union[EventOverlapHolder,
xformers/fwbw_overlap.py:154
Methodbackward
(ctx: torch.autograd.function.FunctionCtx, *gtensors: torch.Tensor)
xformers/fwbw_overlap.py:189
Methodbackward
( # type: ignore ctx: torch.autograd.function.FunctionCtx, gholder: Union[EventOverlapHolder,
xformers/fwbw_overlap.py:220
Methodbackward
(ctx: torch.autograd.function.FunctionCtx, *gx: torch.Tensor)
xformers/fwbw_overlap.py:411
Methodbackward
(ctx, grad_out: torch.Tensor)
xformers/ops/sp24.py:617
Methodbackward
(ctx, grad_out: torch.Tensor)
xformers/ops/sp24.py:663
Methodbackward
(ctx, grad_out: torch.Tensor)
xformers/ops/sp24.py:728
Methodbackward
( # type: ignore[override] ctx, grad_output: torch.Tensor )
xformers/ops/differentiable_collectives.py:92
Methodbackward
( # type: ignore[override] ctx, grad_output: torch.Tensor )
xformers/ops/differentiable_collectives.py:117
Methodbackward
( # type: ignore[override] ctx, grad_output: torch.Tensor )
xformers/ops/differentiable_collectives.py:140
Methodbackward
( # type: ignore[override] ctx, grad_output: torch.Tensor )
xformers/ops/differentiable_collectives.py:168
Methodbackward
(ctx, grad_output)
xformers/ops/indexing.py:69
Methodbackward
(ctx, grad_output)
xformers/ops/indexing.py:180
Methodbackward
(cls, ctx, dx5)
xformers/ops/swiglu_op.py:51
Methodbackward
(cls, ctx, grad: torch.Tensor)
xformers/ops/unbind.py:111
Methodbackward
( # type: ignore[override] ctx: torch.autograd.function.FunctionCtx, grad_attn: torch.Tensor,
xformers/ops/fmha/merge_training.py:65
Methodbackward
( # type: ignore[override] ctx: torch.autograd.function.FunctionCtx, grad_out: torch.Tensor )
xformers/ops/fmha/merge_training.py:105
Methodbackward
(ctx, grad, grad_lse)
xformers/ops/fmha/__init__.py:168
Methodbackward
(ctx: Any, *gtensors)
tests/test_fwbw_overlap.py:30
Functionbench_functions
( test_cases: List[TestCase], shapes, metric_transform, unit, title="" )
xformers/benchmarks/utils.py:123
Functionbenchmark_tiled_matmul
(shape_name, dtype)
xformers/benchmarks/benchmark_tiled_matmul.py:64
Functionblock_sparsify_tensor
Block sparsify a tensor, given a mask and block size
xformers/components/attention/attention_patterns.py:168
Functionbmhk2bmk
(tensor)
tests/test_mem_eff_attention.py:483
Functionbmk2bmhk
(tensor, num_heads: int)
tests/test_mem_eff_attention.py:491
← previousnext →701–800 of 1,445, ranked by callers