-
Notifications
You must be signed in to change notification settings - Fork 58
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
【Hackathon 5th No.44】API转换 42-61 -part #324
Conversation
Thanks for your contribution! |
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.
注意单测不能屏蔽
obj.run(pytorch_code, ["result"]) | ||
|
||
|
||
def _test_case_4(): |
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.
这些单测为何屏蔽了?
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.
tests/test_linalg_eigh.py
Outdated
obj = APIBase("torch.linalg.eigh") | ||
|
||
|
||
def _test_case_1(): |
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.
这些单测为何都屏蔽了?是Matcher写的不对吗
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.
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.
建议测绝对值
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.
已修改,测试发现是 paddle cpu和gpu版本计算结果符号不同,cpu版本没有问题
tests/test_linalg_svd.py
Outdated
obj = APIBase("torch.linalg.svd") | ||
|
||
|
||
def _test_case_1(): |
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.
这些单测为何都屏蔽了?是Matcher写的不对吗
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.
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.
建议可以索引取出相同的值,对于符号不同的,测paddle.abs()的结果。
测结果可以稍灵活点,但肯定不能不测
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.
已修改,测试发现是 paddle cpu和gpu版本计算结果符号不同,cpu版本没有问题
obj = APIBase("torch.symeig", is_aux_api=True) | ||
|
||
|
||
def _test_case_1(): |
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.
这些单测为何都屏蔽了?
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.
- symeig 会转为 eigh,eigh 返回值符号不同
- pytorch 1.9 以上不支持
@co63oc 辛苦再修改一下 |
已修改 |
@zhwesky2010 No.47 比如搜索 RandomUnstructured https://github.com/search?q=repo%3APaddlePaddle%2FPaddleSlim%20RandomUnstructured&type=code |
只是推测的可能位置,不做具体实现用。 |
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.
有一些小问题,后面改下吧,先approve了
import torch | ||
x = torch.tensor([[1, 2], [2, 1]]).to(dtype=torch.float32) | ||
out = torch.tensor([]) | ||
result = torch.linalg.pinv(x, atol=None, rtol=1e-5, hermitian=False, out=out) |
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.
可以测一个全部非关键字的
修改PR #329 |
PR Docs
https://github.com/PaddlePaddle/community/blob/master/hackathon/hackathon_5th/%E3%80%90PaddlePaddle%20Hackathon%205th%E3%80%91%E5%BC%80%E6%BA%90%E8%B4%A1%E7%8C%AE%E4%B8%AA%E4%BA%BA%E6%8C%91%E6%88%98%E8%B5%9B%E6%A1%86%E6%9E%B6%E5%BC%80%E5%8F%91%E4%BB%BB%E5%8A%A1%E5%90%88%E9%9B%86.md#no46%E4%B8%BApaddle%E4%BB%A3%E7%A0%81%E8%BD%AC%E6%8D%A2%E5%B7%A5%E5%85%B7%E6%96%B0%E5%A2%9Eapi%E8%BD%AC%E6%8D%A2%E8%A7%84%E5%88%99
API转换名单 中第5组(编号为84 ~ 102)
文档 PR PaddlePaddle/docs#6288
PR APIs
torch.linalg.eigh 返回值符号不同

torch.linalg.svd 返回值符号不同
