Skip to content
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

转换规则 No.208/220 #210

Merged
merged 3 commits into from
Aug 3, 2023
Merged

转换规则 No.208/220 #210

merged 3 commits into from
Aug 3, 2023

Conversation

co63oc
Copy link
Collaborator

@co63oc co63oc commented Jul 28, 2023

@paddle-bot
Copy link

paddle-bot bot commented Jul 28, 2023

Thanks for your contribution!

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jul 28, 2023
@co63oc co63oc changed the title 转换规则 No.208 转换规则 No.208/220 Jul 28, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 31, 2023
"Matcher": "GenericMatcher",
"paddle_api": "paddle.linalg.cond",
"args_list": [
"A",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个参数顺序不是 torch.linalg.cond(A, p=None, *, out=None)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

torch文档里写的是A,测试参数名称是input

https://github.com/pytorch/pytorch/blob/16df54239fecb97afbda30026931bbcac09542c4/aten/src/ATen/native/native_functions.yaml#L13603
torch代码没有使用Tensor A
图片

Copy link
Collaborator

Choose a reason for hiding this comment

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

@co63oc 那这个args_list应该是 input、p、out

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改,保留A是不确定torch不同版本是否不同

"torch.linalg.cond": {
"Matcher": "GenericMatcher",
"paddle_api": "paddle.linalg.cond",
"args_list": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

那这个args_list应该是 input、p、out 吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

import torch
x = torch.tensor([[1., 0, -1], [0, 1, 0], [1, 0, 1]])
out = torch.tensor([])
result = torch.linalg.cond(x, p=float('inf'), out=out)
Copy link
Collaborator

Choose a reason for hiding this comment

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

infoflow 2023-08-03 12-31-08

补充一下这些case,最新的单测规范,这个如果都 不指定关键字,args_list写错了应该就会触发问题

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 1bbc97b into PaddlePaddle:master Aug 3, 2023
8 checks passed
@co63oc co63oc deleted the api208 branch August 19, 2023 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR status: proposed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants