MCPcopy Create free account

hub / github.com/facebookresearch/xformers / types & classes

Types & classes346 in github.com/facebookresearch/xformers

↓ 10 callersClassInputs
Stores inputs to the `memory_efficient_attention` operators
xformers/ops/fmha/common.py:145
↓ 9 callersClassContext
xformers/ops/fmha/common.py:345
↓ 5 callersClassGradients
xformers/ops/fmha/common.py:368
↓ 4 callersClassEventOverlapHolder
Holds a CUDAEvent. Why does it need to be a tensor? So that its `gradient` can also hold a CUDAEvent for overlaps in the BW pass
xformers/fwbw_overlap.py:43
↓ 4 callersClassLowerTriangularMaskWithTensorBias
A lower-triangular (aka causal) mask with an additive bias
xformers/ops/fmha/attn_bias.py:360
↓ 4 callersClassRMSNorm
RMS Normalization layer along the last dimension. This is similar to torch.nn.functional.normalize but with eps being added instead of m
xformers/ops/rmsnorm.py:72
↓ 4 callersClassScenario
xformers/benchmarks/benchmark_sequence_parallel_fused.py:23
↓ 4 callersClassSparse24TensorCutlass
xformers/ops/sp24.py:363
↓ 3 callersClassLowerTriangularFromBottomRightMask
A causal masking. This mask is exactly the same as :attr:`LowerTriangularMask` when there is the same number of queries and keys. Wh
xformers/ops/fmha/attn_bias.py:261
↓ 3 callersClassNotSupportedInputError
xformers/benchmarks/utils.py:34
↓ 2 callersClassBlockDiagonalCausalFromBottomRightMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except that each block is causal. This mask allows for a non-causal prefix
xformers/ops/fmha/attn_bias.py:1026
↓ 2 callersClassBlockDiagonalCausalLocalAttentionFromBottomRightMask
(Experimental feature) Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`. This makes the mask "local" and the attention
xformers/ops/fmha/attn_bias.py:1916
↓ 2 callersClassBlockDiagonalCausalLocalAttentionMask
(Experimental feature) Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`. This makes the mask "local" and the attention
xformers/ops/fmha/attn_bias.py:1853
↓ 2 callersClassBlockDiagonalCausalMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except that each block is causal. Queries and Keys are each divided into the
xformers/ops/fmha/attn_bias.py:994
↓ 2 callersClassBlockDiagonalLocalAttentionPaddedKeysMask
Like :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalLocalAttentionPaddedKeysMask`, except that this is non-causal. A query Q in b
xformers/ops/fmha/attn_bias.py:1279
↓ 2 callersClassLinearW24
tests/test_sparsity24.py:771
↓ 2 callersClassTile4x4Accessor
xformers/csrc/sparse24/sparse24_pack.h:166
↓ 2 callersClass_GappySeqInfo
(Internal) Flexible equivalent of _PaddedSeqLenInfo. There are two distinct semantics. (1) For non-paged masks: Represents the divis
xformers/ops/fmha/attn_bias.py:636
↓ 2 callersClass_PaddedSeqLenInfo
(Internal) Represents the division of a dimension into blocks which are padded out to the same total length. For example, to represent
xformers/ops/fmha/attn_bias.py:500
↓ 2 callersClass_VisitorConditionalKernel
xformers/triton/vararg_kernel.py:119
↓ 1 callersClassAdd_
tests/test_checkpoint.py:256
↓ 1 callersClassAnalyzedTrace
xformers/profiler/profile_analyzer.py:120
↓ 1 callersClassAttention
examples/llama_inference/model.py:51
↓ 1 callersClassAttentionDecodingPyTorchRepeat
xformers/benchmarks/benchmark_attn_decoding.py:335
↓ 1 callersClassAttn
tests/test_checkpoint.py:138
↓ 1 callersClassBench
xformers/benchmarks/benchmark_sequence_parallel_fused.py:42
↓ 1 callersClassBlockDiagonalCausalLocalAttentionPaddedKeysMask
Like :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalWithOffsetPaddedKeysMask`, except with a window size. A query Q in block i ca
xformers/ops/fmha/attn_bias.py:1345
↓ 1 callersClassBlockDiagonalCausalWithOffsetGappyKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`, except k/v is gappy. A query Q in block i cannot attend to a key wh
xformers/ops/fmha/attn_bias.py:1658
↓ 1 callersClassBlockDiagonalCausalWithOffsetPaddedKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalCausalMask`, except an offset on causality is allowed for each block and we support p
xformers/ops/fmha/attn_bias.py:1205
↓ 1 callersClassBlockDiagonalGappyKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except k/v is gappy. A query Q in block i only attends to a key which is
xformers/ops/fmha/attn_bias.py:1535
↓ 1 callersClassBlockDiagonalMask
A block-diagonal mask that can be passed as ``attn_bias`` argument to :attr:`xformers.ops.memory_efficient_attention`. Queries and Keys
xformers/ops/fmha/attn_bias.py:753
↓ 1 callersClassBlockDiagonalPaddedKeysMask
Same as :attr:`xformers.ops.fmha.attn_bias.BlockDiagonalMask`, except we support padding for k/v The keys and values are divided into bl
xformers/ops/fmha/attn_bias.py:1076
↓ 1 callersClassBlockSparseTensor
xformers/sparse/blocksparse_tensor.py:76
↓ 1 callersClassCachedTorchDispatchMode
xformers/checkpoint.py:120
↓ 1 callersClassDeviceLimit
xformers/profiler/device_limits.py:14
↓ 1 callersClassEventHandle
xformers/fwbw_overlap.py:24
↓ 1 callersClassEventOverlap
xformers/fwbw_overlap.py:31
↓ 1 callersClassExceptionInBW
tests/test_fwbw_overlap.py:130
↓ 1 callersClassFakeKinetoEvent
xformers/profiler/profile_analyzer.py:14
↓ 1 callersClassFastGen
examples/llama_inference/generate.py:37
↓ 1 callersClassFeedForward
examples/llama_inference/model.py:154
↓ 1 callersClassGenArgs
examples/llama_inference/generate.py:29
↓ 1 callersClassIdentity
xformers/csrc/sparse24/warp_tensor.h:398
↓ 1 callersClassInitialBw
xformers/fwbw_overlap.py:327
↓ 1 callersClassInputsFp8
Each of k/v_fp8_scales is an int32 tensor of shape (1, B * Mkv, Hq), or (1, page_size * max_pages_per_lane, Hq) in the paged case. Each i
xformers/ops/fmha/triton_splitk.py:93
↓ 1 callersClassLocalAttentionFromBottomRightMask
A local attention mask The query at position :math:`q` can attend the key at position :math:`k` if :math:`q - window\\_left <= k + s <=
xformers/ops/fmha/attn_bias.py:176
↓ 1 callersClassLowerTriangularFromBottomRightLocalAttentionMask
A mask that combines both :attr:`LowerTriangularFromBottomRightMask` and local attention. A query whose distance from the final query is
xformers/ops/fmha/attn_bias.py:309
↓ 1 callersClassLowerTriangularMask
A lower-triangular (aka causal) mask A query Q cannot attend to a key which is farther from the initial key than Q is from the initial q
xformers/ops/fmha/attn_bias.py:142
↓ 1 callersClassNullTorchDispatchMode
xformers/checkpoint.py:137
↓ 1 callersClassPagedBlockDiagonalCausalWithOffsetGappyKeysMask
Same as BlockDiagonalCausalWithOffsetGappyKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have
xformers/ops/fmha/attn_bias.py:1828
↓ 1 callersClassPagedBlockDiagonalCausalWithOffsetPaddedKeysMask
Same as BlockDiagonalCausalWithOffsetPaddedKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have
xformers/ops/fmha/attn_bias.py:1508
↓ 1 callersClassPagedBlockDiagonalGappyKeysMask
Equivalent BlockDiagonalGappyKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have shape [1,
xformers/ops/fmha/attn_bias.py:1708
↓ 1 callersClassPagedBlockDiagonalPaddedKeysMask
Same as BlockDiagonalPaddedKeysMask, but for paged attention. block_tables has shape [batch_size, max_num_pages] and K/V have shape [1, m
xformers/ops/fmha/attn_bias.py:1402
↓ 1 callersClassPartial
This class is used to represent a partial attention output, which is returned by `memory_efficient_attention_partial_autograd`. Attribut
xformers/ops/fmha/merge_training.py:112
↓ 1 callersClassPhaseBoundary
xformers/fwbw_overlap.py:286
↓ 1 callersClassPhaseStats
examples/llama_inference/stats.py:12
↓ 1 callersClassProcessPoolExecutorManager
tests/multiprocessing_utils.py:142
↓ 1 callersClassProfileMetadata
xformers/checkpoint.py:71
↓ 1 callersClassProfileOperatorsTorchDispatchMode
xformers/checkpoint.py:209
↓ 1 callersClassRMSNormPytorch
tests/test_rmsnorm.py:26
↓ 1 callersClassSafeMpContext
tests/multiprocessing_utils.py:17
↓ 1 callersClassScaledTensor
xformers/ops/fmha/common.py:58
↓ 1 callersClassSelectiveCheckpointWrapper
xformers/checkpoint.py:475
↓ 1 callersClassSparse24TensorCuSparseLt
xformers/ops/sp24.py:497
↓ 1 callersClassStats
Generation stats, split by phases.
examples/llama_inference/stats.py:27
↓ 1 callersClassSwiGLUOpDispatch
Dispatcher to automatically select the best operator in :attr:`xformers.ops.swiglu`
xformers/ops/swiglu_op.py:127
↓ 1 callersClassTokenizer
Encoding/decoding text using SentencePiece.
examples/llama_inference/tokenizer.py:11
↓ 1 callersClassTransformerBlock
examples/llama_inference/model.py:209
↓ 1 callersClassTreeAttnMetadata
tree_choices: definition of the tree, tuples sorted by length, each corresponding to a node. See the docstring of TreeAttnMetadata.from_t
xformers/ops/tree_attention.py:34
↓ 1 callersClassVerboseTorchDispatchMode
xformers/checkpoint.py:98
↓ 1 callersClass_BuildInfo
xformers/_cpp_lib.py:23
↓ 1 callersClass_ForLoopUnroller
xformers/triton/vararg_kernel.py:19
↓ 1 callersClass_ForwardToFunc
xformers/ops/swiglu_op.py:101
↓ 1 callersClass_ForwardToPythonAutogradFunc
xformers/ops/swiglu_op.py:93
↓ 1 callersClass_FusedSequenceParallel
Set up a communication ring and perform fused ops on it Stores the persistent state needed to support a ring of connections between processes
xformers/ops/sequence_parallel_fused_ops.py:26
↓ 1 callersClass_Model
tests/test_checkpoint.py:278
↓ 1 callersClass_OptimalPolicy
xformers/checkpoint.py:461
↓ 1 callersClass_Profiler
xformers/profiler/profiler.py:223
↓ 1 callersClass_ProfilerState
xformers/profiler/profiler.py:216
↓ 1 callersClass_SeqLenInfo
(Internal) Represents the division of a dimension into blocks. For example, to represents a dimension of length 7 divided into three blo
xformers/ops/fmha/attn_bias.py:382
↓ 1 callersClass_TransformerFFN
tests/test_sparsity24.py:958
↓ 1 callersClass_VisitorUnrollKernel
xformers/triton/vararg_kernel.py:90
↓ 1 callersClassxFormersInvalidLibException
xformers/_cpp_lib.py:65
↓ 1 callersClassxFormersWasNotBuiltException
xformers/_cpp_lib.py:55
ClassAbsOp
Can be applied to rank based on absolute value
xformers/csrc/sparse24/compute_sparse_tile.h:24
ClassAttentionBias
Base class for a custom bias that can be applied \ as the attn_bias argument in :attr:`xformers.ops.memory_efficient_attention`. That
xformers/ops/fmha/attn_bias.py:55
ClassAttentionBwOpBase
xformers/ops/fmha/common.py:527
ClassAttentionDecodingBase
xformers/benchmarks/benchmark_attn_decoding.py:75
ClassAttentionDecodingCK
xformers/benchmarks/benchmark_attn_decoding.py:168
ClassAttentionDecodingCKSplitKV
xformers/benchmarks/benchmark_attn_decoding.py:243
ClassAttentionDecodingCUTLASS
xformers/benchmarks/benchmark_attn_decoding.py:164
ClassAttentionDecodingFlashAttention
xformers/benchmarks/benchmark_attn_decoding.py:369
ClassAttentionDecodingSplitInt4KV
xformers/benchmarks/benchmark_attn_decoding.py:247
ClassAttentionDecodingSplitKV
xformers/benchmarks/benchmark_attn_decoding.py:239
ClassAttentionFwOpBase
xformers/ops/fmha/common.py:508
ClassAttentionOpBase
Base class for any attention operator in xFormers See: - :attr:`xformers.ops.fmha.cutlass.FwOp` - :attr:`xformers.ops.fmha.cutlass.BwOp`
xformers/ops/fmha/common.py:376
ClassBaseOperator
xformers/ops/common.py:27
ClassBatchedBackwardParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:144
ClassBatchedForwardParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:42
ClassBatchedInferParams
xformers/csrc/attention/hip_fmha/ck_tiled_fmha_params.h:12
next →1–100 of 346, ranked by callers