Skip to content

Commit 11649aa

Browse files
committed
[asynctp] Knobs to enable asynctp; Adding constraints to solver to
incentivize asynctp
1 parent cd27579 commit 11649aa

File tree

6 files changed

+3118
-5
lines changed

6 files changed

+3118
-5
lines changed

autoparallel/api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def __init__(
160160
enable_ac: bool = True,
161161
# None means 'auto'
162162
ac_stage_size_in_GiB: Optional[Union[float, str]] = "auto",
163+
enable_asynctp: bool = False,
163164
**kwargs,
164165
):
165166
self.stack = ExitStack()
@@ -190,6 +191,8 @@ def __init__(
190191
self.enable_ac = enable_ac
191192
self.ac_stage_size_in_GiB = ac_stage_size_in_GiB
192193

194+
self.enable_asynctp = enable_asynctp
195+
193196
# NB: rest of the construction happens in __enter__
194197
self.active = False
195198

@@ -216,6 +219,7 @@ def __enter__(self):
216219
self.mesh,
217220
rescale_grad_comm_cost_for_mp,
218221
repeated_subgraphs=self.kwargs.get("repeated_subgraphs", False),
222+
enable_asynctp=self.enable_asynctp,
219223
)
220224

221225
# makes sharding of params and gradients the same

0 commit comments

Comments
 (0)