Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Xing-lil committed Jan 22, 2025
1 parent 2857ca5 commit 576efb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,8 @@ def comm_count(self):
dtype = var.dtype
shape = var.shape
elif self.op_desc is not None:
dtype = self.op_desc["inputs"]["x"][0][0]
shape = self.op_desc["inputs"]["x"][0][1]
dtype = self.op_desc["inputs"]["X"][0][0]
shape = self.op_desc["inputs"]["X"][0][1]

factor = None
if dtype == paddle.float32 or dtype == paddle.int32:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ def test_comm_cost(self):
CommContext._instance = None
comm_context = CommContext(cluster)
desc = {}
desc["op"] = "c_allreduce_sum"
desc["op"] = "all_reduce"
desc["inputs"] = {"X": [(paddle.float32, [100, 200])]}
desc["group_ranks"] = [0, 1]
allreduce_cost = cost_model._g_op_cost_factory["c_allreduce_sum"](
allreduce_cost = cost_model._g_op_cost_factory["all_reduce"](
op_desc=desc, comm_context=CommContext(cluster)
)
self.assertTrue(check_cost(allreduce_cost.cost))
Expand Down

0 comments on commit 576efb2

Please sign in to comment.