Skip to content

CI测试不review[fluid_ops] barrier C_ops #72172

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

Closed
wants to merge 1 commit into from
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
8 changes: 2 additions & 6 deletions python/paddle/distributed/auto_parallel/static/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,7 @@ def init_pir(self, main_program, place):
barrier_tensor = paddle.full([1], 1, dtype="int32")
# barrier is not available in xpu for now
if not paddle.framework.core.is_compiled_with_xpu():
paddle._legacy_C_ops.barrier(
barrier_tensor, barrier_tensor, 'ring_id', 0
)
paddle._C_ops.barrier(barrier_tensor, 0)
paddle.enable_static()

def init(self, main_program, place, dist_context):
Expand Down Expand Up @@ -600,9 +598,7 @@ def init(self, main_program, place, dist_context):
barrier_tensor = paddle.full([1], 1, dtype="int32")
# barrier is not available in xpu for now
if not paddle.framework.core.is_compiled_with_xpu():
paddle._legacy_C_ops.barrier(
barrier_tensor, barrier_tensor, 'ring_id', 0
)
paddle._C_ops.barrier(barrier_tensor, 0)
paddle.enable_static()

def cache_whole_graph_dist_attr(self, all_params):
Expand Down
4 changes: 1 addition & 3 deletions python/paddle/distributed/communication/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ def barrier(group: Group | None = None) -> None:
if framework.in_dynamic_mode():
# barrier is not available in xpu for now
if not paddle.framework.core.is_compiled_with_xpu():
return paddle._legacy_C_ops.barrier(
barrier_tensor, barrier_tensor, 'ring_id', ring_id
)
return paddle._C_ops.barrier(barrier_tensor, ring_id)
else:
op_type = 'barrier'
if not isinstance(ring_id, int):
Expand Down
Loading