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.
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
【SCU】【Paddle Tensor No.25】新增
paddle.vecdot
,paddle.linalg.vecdot
#69477【SCU】【Paddle Tensor No.25】新增
paddle.vecdot
,paddle.linalg.vecdot
#69477Changes from 1 commit
9acb5b0
74c2c27
7888577
7b1e0dd
f714d88
ebd6c02
4193810
abffd22
ef6edd2
2696682
fe9ec10
e77b6ca
9e1be50
b851f62
12c2e11
64a53fe
31f669f
0c014c7
1a63df0
b67324c
a970f65
3034ea1
77744cb
50b557d
e299388
06793f5
18c5ed5
314606a
0d65079
254eb8d
9e90b92
0690cd1
dc52bc3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
参考API规范定义,vecdot应该是逐元素乘法后再在axis轴上求和:https://data-apis.org/array-api/latest/API_specification/generated/array_api.vecdot.html#array_api.vecdot
所以可以参考如下实现(复用乘法和sum)
https://github.com/pytorch/pytorch/blob/main/torch/_refs/linalg/__init__.py#L307
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.
omg sry,已修改,谢谢佬更正!
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.
这是新增的API,不是OP,参考这几个文件写一下单测
文件名建议改成test_linalg_vecdot.py