This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for your contribution! |
Closed
CINN目前已升级至C++17(PR1526),CI的Docker镜像也已同步更新,可以 git fetch origin
git merge origin/develop |
收到,已merge |
thisjiang
reviewed
Jun 27, 2023
python/tests/ops/test_mul_op.py
Outdated
y_num_col_dim = self.y_np.size | ||
print("x_num_col_dim", x_num_col_dim) | ||
print("y_num_col_dim", y_num_col_dim) | ||
x_weight = reduce(lambda x, y: x * y, x[:x_num_col_dim]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是x[:x_num_col_dim]
而应该是x.shape
呀
另外如果reduce不能规约一维list可以自己写一个,比如可以:
def accumulate(arr, start, end):
res = 1
for i in range(start, end):
res = res * arr[i]
return res
这儿
x_weight = accumulate(x.shape, 0, x_num_col_dim)
x_height = accumulate(x.shape, x_num_col_dim, len(x.shape))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在aistudio用1.8测到的mul结果和aistudio2.4中一致,但ci这边错
该算子由 @FisherWY 接手 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
描述
From #1378
为mul类型算子增加新的测试用例
算子类型
OpMapper
Test Cases Checklist
张量维度
special shape
挑选 2D/3D/4D 张量中的一个,测试下面的特殊情况。
张量数据类型
广播
算子属性
算子属性的测试用例。
op_type
axis
keepdim
备注