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.359 #257

Merged
merged 1 commit into from
Aug 29, 2023
Merged

转换规则 No.359 #257

merged 1 commit into from
Aug 29, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Aug 26, 2023

PR Docs

PR Docs

#112

359 torch.linalg.solve_triangular

映射文档修改 PaddlePaddle/docs#6141

PR APIs

@paddle-bot
Copy link

paddle-bot bot commented Aug 26, 2023

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 26, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Aug 28, 2023
def generate_code(self, kwargs):
new_kwargs = {}
if "left" in kwargs:
left = kwargs.pop("left").strip("(").strip(")")
Copy link
Collaborator

Choose a reason for hiding this comment

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

这样实现吧,https://github.com/PaddlePaddle/PaConvert/blob/master/paconvert/api_matcher.py#L1050

因为kwargs.pop("left")可能是一个变量,这样就无法判断了:

left = True
torch.linalg.solve_triangular(left=left)

Copy link
Contributor 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 95ae367 into PaddlePaddle:master Aug 29, 2023
@co63oc co63oc deleted the api359 branch September 7, 2023 06:52
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants