[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:
RoyWang
2026-01-22 12:06:41 +00:00
committed by RandNMR73
co-authored by roywang Will Lin
parent 05214b5aef
commit 6eedc0acb0
+3 -1
View File
@@ -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,