Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autoparallel/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def __init__(
enable_ac: bool = True,
# None means 'auto'
ac_stage_size_in_GiB: Optional[Union[float, str]] = "auto",
enable_asynctp: bool = False,
**kwargs,
):
self.stack = ExitStack()
Expand Down Expand Up @@ -190,6 +191,8 @@ def __init__(
self.enable_ac = enable_ac
self.ac_stage_size_in_GiB = ac_stage_size_in_GiB

self.enable_asynctp = enable_asynctp

# NB: rest of the construction happens in __enter__
self.active = False

Expand All @@ -216,6 +219,7 @@ def __enter__(self):
self.mesh,
rescale_grad_comm_cost_for_mp,
repeated_subgraphs=self.kwargs.get("repeated_subgraphs", False),
enable_asynctp=self.enable_asynctp,
)

# makes sharding of params and gradients the same
Expand Down
Loading
Loading