SDPBackend — PyTorch 2.7 documentation (original) (raw)

class torch.nn.attention.SDPBackend

An enum-like class that contains the different backends for scaled dot product attention. This backend class is designed to be used with the sdpa_kernel context manager.

The following Enums are available:

See torch.nn.attention.sdpa_kernel() for more details.

Warning

This class is in beta and subject to change.

property name