mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Improve Scheduler init duration (#161491)
Early exit merge_loops() if config.loop_ordering_after_fusion is false. Pull Request resolved: https://github.com/pytorch/pytorch/pull/161491 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
fd60117051
commit
9b02435e9f
@ -2755,10 +2755,10 @@ class Scheduler:
|
||||
node.max_order = order
|
||||
|
||||
def merge_loops(self) -> None:
|
||||
for node in self.nodes:
|
||||
if not config.loop_ordering_after_fusion:
|
||||
continue
|
||||
return
|
||||
|
||||
for node in self.nodes:
|
||||
# Even for CPU, if we are using the halide backend, we still need
|
||||
# the merge loops steps below
|
||||
if not isinstance(node, (SchedulerNode, FusedSchedulerNode)) or (
|
||||
|
Reference in New Issue
Block a user