SDPBackend#
- class torch.nn.attention.SDPBackend#
An enum-like class that contains the different backends for scaled dot product attention.
… warning:: This class is in beta and subject to change.
This backend class is designed to be used with the sdpa_kernel context manager.See :func: torch.nn.attention.sdpa_kernel for more details.
Members:
ERROR
MATH
FLASH_ATTENTION
EFFICIENT_ATTENTION
CUDNN_ATTENTION
OVERRIDEABLE
- property name#