Skip to content

Commit

Permalink
fix, when x's shape is (0, ...), y is empty and concat_op raises errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sljlp committed Jan 6, 2022
1 parent aaa00ab commit 535fb2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/paddle/distributed/model/moe/moe_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ def forward(self, inp):
d_model = self.d_model

def experts_fwd(x, fwd_expert_count, experts):

if x.shape[0] == 0:
return paddle.empty(x.shape, x.dtype)
y = []
last_index = 0
assert isinstance(fwd_expert_count, np.ndarray)
Expand Down

1 comment on commit 535fb2f

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #35 Commit ID: 535fb2f contains failed CI.

🔹 Failed: PR-CE-Framework

Unknown Failed
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 [linalg cases result]
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 [paddlebase cases result]
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 [loss cases result]
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 [nn cases result]
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 [optimizer cases result]
2022-01-06 20:47:36 ============ failed cases =============
2022-01-06 20:47:36 total bugs: 0
2022-01-06 20:47:36 {build code state=0}
2022-01-06 20:47:36 build Paddle success!

Please sign in to comment.