You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyTorch 2.0 (nightlies) now supports dropout > 0.0, so the check for dropout can be removed.
(And even if on back-level PyTorch builds, we can handle dropout > 0.0 where it will just fall back to sdpa_math() which is pretty much the same implementation based on the SDPA math that nanogpt uses today when flash is not available.)
PyTorch 2.0 (nightlies) now supports dropout > 0.0, so the check for dropout can be removed.
(And even if on back-level PyTorch builds, we can handle dropout > 0.0 where it will just fall back to sdpa_math() which is pretty much the same implementation based on the SDPA math that nanogpt uses today when flash is not available.)
Constraints to dispatch to Flash Attention are defined in use_flash_attention
https://github.com/pytorch/pytorch/blob/4973ca5e3e2c07311a879f49ac8983b7cae81a2d/aten/src/ATen/native/transformers/cuda/sdp_utils.h#L576
as follows:
https://github.com/pytorch/pytorch/blob/4973ca5e3e2c07311a879f49ac8983b7cae81a2d/aten/src/ATen/native/transformers/cuda/sdp_utils.h#L584-L592
The text was updated successfully, but these errors were encountered: