10000 Fix assertion in reorder_communication_preserving_peak_memory (#152565) · pytorch/pytorch@53bf174 · GitHub
[go: up one dir, main page]

Skip to content

Commit 53bf174

Browse files
wconstabpytorchmergebot
authored andcommitted
Fix assertion in reorder_communication_preserving_peak_memory (#152565)
>=0 is practically correct becuase we do model the runtime of some ops as 0. Pull Request resolved: #152565 Approved by: https://github.com/eellison
1 parent 47972f9 commit 53bf174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/_inductor/comms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class ReorderInfo:
165165

166166
@property
167167
def improvement(self):
168-
assert self.initial_exposed >= self.final_exposed > 0
168+
assert self.initial_exposed >= self.final_exposed >= 0
169169
return self.initial_exposed - self.final_exposed
170170

171171

0 commit comments

Comments
 (0)
0