Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support new python op supported backend #26

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion bagua/torch_api/algorithms/allreduce/allreducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def set_communication_op(
hierarchical_reduce=False,
**kwargs
):
bagua_bucket.set_centralized_synchronous_op(
bagua_bucket.append_centralized_synchronous_op(
inter_communicator,
intra_communicator,
hierarchical=hierarchical_reduce,
Expand Down
2 changes: 1 addition & 1 deletion bagua/torch_api/algorithms/allreduce/sg_allreducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def set_communication_op(
hierarchical_reduce=False,
**kwargs
):
bagua_bucket.set_centralized_synchronous_op(
bagua_bucket.append_centralized_synchronous_op(
inter_communicator,
intra_communicator,
hierarchical=hierarchical_reduce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def set_communication_op(
hierarchical_reduce=False,
**kwargs
):
bagua_bucket.set_decentralized_synchronous_op(
bagua_bucket.append_decentralized_synchronous_op(
inter_communicator,
intra_communicator,
hierarchical=hierarchical_reduce,
Expand Down
4 changes: 2 additions & 2 deletions bagua/torch_api/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ def new_bagua_tensor(param):

# register bagua tensor and bagua bucket
bagua_buckets = []
for bucket_params in self.param_buckets:
for index, bucket_params in enumerate(self.param_buckets):
bagua_tensors = [new_bagua_tensor(p) for p in bucket_params]
# Note: align_bytes does not work when inplace=True
bagua_bucket = B.BaguaBucketPy(
bagua_tensors, inplace=self.fusion, align_bytes=self.align_bytes
"bucket_" + str(index), bagua_tensors, inplace=self.fusion, align_bytes=self.align_bytes
NOBLES5E marked this conversation as resolved.
Show resolved Hide resolved
)

kwargs = {"param_name": self.param_name}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def check_torch_version():
author="Kuaishou AI Platform & DS3 Lab",
author_email="admin@mail.xrlian.com",
install_requires=[
"bagua-core<0.2",
"bagua-core>=0.2,<0.3",
"deprecation",
"pytest-benchmark",
"scikit-optimize",
Expand Down