.. currentmodule:: torch.nn.attention.flex_attention
.. py:module:: torch.nn.attention.flex_attention
.. autofunction:: flex_attention
.. autofunction:: create_block_mask
.. autofunction:: create_mask
.. autofunction:: create_nested_block_mask
.. autofunction:: and_masks
.. autofunction:: or_masks
.. autofunction:: noop_mask
.. autoclass:: BlockMask :members: :undoc-members: