[fix]: fix sliding_tile_attn with sdpa(without flash_attn) (#967)
Co-authored-by: roywang <roywang@amd.com> Co-authored-by: Will Lin <wlsaidhi@gmail.com>
This commit is contained in:
committed by
RandNMR73
co-authored by
roywang
Will Lin
parent
05214b5aef
commit
6eedc0acb0
@@ -82,7 +82,9 @@ class SDPAImpl(AttentionImpl):
|
||||
key = key.transpose(1, 2)
|
||||
value = value.transpose(1, 2)
|
||||
|
||||
attn_mask = attn_metadata.attn_mask if attn_metadata is not None else None
|
||||
attn_mask = attn_metadata.attn_mask if (
|
||||
attn_metadata is not None
|
||||
and hasattr(attn_metadata, "attn_mask")) else None
|
||||
attn_kwargs = {
|
||||
"attn_mask": attn_mask,
|
||||
"dropout_p": self.dropout,
|
||||
|
||||
Reference in New Issue
Block a user