File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
autoparallel/autobucketing_util Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 99
1010import torch
1111from torch ._inductor import ir , scheduler
12- from torch ._inductor .dependencies import StarDep , WeakDep
1312from torch ._inductor .comms import get_op_idx
13+ from torch ._inductor .dependencies import StarDep , WeakDep
1414from torch ._inductor .utils import is_collective , is_wait
1515from torch ._inductor .virtualized import V
1616from torch .utils ._ordered_set import OrderedSet
Original file line number Diff line number Diff line change @@ -187,11 +187,13 @@ def get_simplefsdp_auto_plan(
187187 )
188188
189189 # (3) Communication size criteria
190- break_comm_size_criteria = (
191- comm_cache .ag_max_inp_size <= comm_size_inp
192- or comm_cache .rs_max_out_size
193- <= heuristic_info ["this_step_rs_comm_out_size" ]
194- )
190+ break_comm_size_criteria = comm_cache .ag_max_inp_size < comm_size_inp
191+ if comm_cache .rs_max_out_size > 0 :
192+ break_comm_size_criteria = (
193+ break_comm_size_criteria
194+ or comm_cache .rs_max_out_size
195+ < heuristic_info ["this_step_rs_comm_out_size" ]
196+ )
195197
196198 if (
197199 break_overlap_criteria
You can’t perform that action at this time.
0 commit comments