8000 Update · pytorch/pytorch@3871a3f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3871a3f

Browse files
committed
Update
[ghstack-poisoned]
1 parent f98ce77 commit 3871a3f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

torch/_inductor/fx_passes/fuse_attention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def _sfdp_replacement_20(query, key, value, attn_mask, dropout_p):
584584
def _sfdp_pattern_24(query, key, value, attention_mask):
585585
"""
586586
this pattern is for MBartForCausalLM/PLBartForCausalLM.
587-
attn_mask has a differnt dtype with QKV.
587+
attn_mask has a different dtype with QKV.
588588
there is no scale in sdpa.
589589
"""
590590
bs = query.size(0)

torch/fx/traceback.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def __init__(
8181
self.from_node = []
8282

8383
# cache the action string and dict representation for performance.
84-
self._action_string = None
85-
self._dict = None
84+
self._action_string: Optional[str] = None
85+
self._dict: Optional[dict[str, Any]] = None
8686

8787
@property
8888
def name(self) -> str:
@@ -130,6 +130,7 @@ def to_dict(self) -> dict:
130130
"from_node": [node.to_dict() for node in self.from_node],
131131
}
132132

133+
assert self._dict is not None
133134
return self._dict
134135

135136
def __eq__(self, other: object):

0 commit comments

Comments
 (0)
0