[API Compatibility No.114] support torch.masked_fill(input=...) with change-prefix mapping -part#828
Open
Aidenwu0209 wants to merge 2 commits intoPaddlePaddle:masterfrom
Open
Conversation
|
Thanks for your contribution! |
This was referenced Feb 15, 2026
Collaborator
|
请修复 CodeStyle 流水线。 |
Contributor
Author
|
@luotao1 已修复,原因是 api_mapping.json 中 |
zhwesky2010
reviewed
Mar 3, 2026
| }, | ||
| "min_input_args": 1 | ||
| }, | ||
| "torch.nn.utils.rnn.pad_sequence": { |
Contributor
Author
There was a problem hiding this comment.
已拉取最新upstream master,该排序问题已在上游修复,不再需要额外处理。
tests/test_masked_fill.py
Outdated
| paddle_code = ( | ||
| "import paddle\n\n" | ||
| "x = paddle.ones(2, 4)\n" | ||
| "result = paddle.masked_fill(mask=x > 0, input=x, value=2)" |
Collaborator
There was a problem hiding this comment.
这个不需要改,只有代码无法运行的时候,才改成字符串比对。正常情况下都需要直接运行来对比
Contributor
Author
There was a problem hiding this comment.
已还原,test_case_3 和 test_case_4 恢复为 obj.run(pytorch_code, ["result"]) 直接运行对比。
tests/test_masked_fill.py
Outdated
| "import paddle\n\n" | ||
| "x = paddle.ones(2, 4)\n" | ||
| "mask = x > 0\n" | ||
| "result = paddle.masked_fill(input=x, mask=mask, value=2)" |
Collaborator
|
@Aidenwu0209 PR描述里可以附录一下paddle的修改PR |
…tcher Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26253d0 to
a3caf88
Compare
Contributor
Author
|
@zhwesky2010 已根据review意见修改:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Docs
PR APIs
Paddle PR
Description
torch.masked_fillmapping fromGenericMatchertoChangePrefixMatcher.Test