Skip to content
Merged
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
20 changes: 19 additions & 1 deletion autoparallel/auto_bucketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import torch

from .autobucketing_util import bucket_plan, bucket_utils
from .autobucketing_util import bucket_func, bucket_plan, bucket_utils


class simplefsdp_autobucketing_config:
Expand Down Expand Up @@ -53,4 +53,22 @@ def simple_fsdp_autobucketing_reordering_pass(
bucketable_nodes,
configs,
)

snodes = bucket_func.bucket_fsdp_all_gather_with_plan(
scheduler,
snodes,
scheduler.name_to_buf,
scheduler.name_to_fused_node,
all_gather_plan,
bucketable_nodes,
)
if len(reduce_scatter_plan) > 0:
snodes = bucket_func.bucket_fsdp_reduce_scatter_with_plan(
scheduler,
snodes,
scheduler.name_to_buf,
scheduler.name_to_fused_node,
reduce_scatter_plan,
bucketable_nodes,
)
return snodes
Loading