mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Revert "[Inductor][Easy] Fix a test failure in loop_ordering_after_fusion (#142273)"
This reverts commit e4ecb09b3513e0ee53ed87496d8bfdf5d2944042. Reverted https://github.com/pytorch/pytorch/pull/142273 on behalf of https://github.com/huydhn due to Internal has been ninja unlanded D66906175 ([comment](https://github.com/pytorch/pytorch/pull/142273#issuecomment-2530751665))
This commit is contained in:
@ -3118,10 +3118,7 @@ class Scheduler:
|
||||
del device2
|
||||
|
||||
shared_data_score = self.score_fusion_memory(node1, node2)
|
||||
if (
|
||||
shared_data_score < config.score_fusion_memory_threshold
|
||||
and config.loop_ordering_after_fusion
|
||||
):
|
||||
if shared_data_score == 0:
|
||||
shared_data_score = self.shared_data_after_reordering_loop(node1, node2)
|
||||
|
||||
if loop_ordering_log.isEnabledFor(logging.DEBUG):
|
||||
@ -3302,7 +3299,7 @@ class Scheduler:
|
||||
node2_dep_len = len(node1.read_writes.reads) + len(node2.read_writes.writes)
|
||||
|
||||
# optimization: iter over smaller set
|
||||
if min(node1_dep_len, node2_dep_len) * 4 < max(node1_dep_len, node2_dep_len):
|
||||
if max(node1_dep_len, node2_dep_len) * 4 > min(node1_dep_len, node2_dep_len):
|
||||
if node1_dep_len > node2_dep_len:
|
||||
tmp = node1
|
||||
node1 = node2
|
||||
|
Reference in New Issue
Block a user