[API Compatibility No.246, 247] align torch.Tensor.retain_grad And torch.Tensor.sparse_mask with ChangePrefix -part#848
Merged
zhwesky2010 merged 16 commits intoPaddlePaddle:masterfrom Mar 31, 2026
Conversation
|
Thanks for your contribution! |
This was referenced Mar 8, 2026
Contributor
Author
|
/re-run all-failed |
zhwesky2010
reviewed
Mar 16, 2026
| "torch.Tensor.sparse_mask": { | ||
| "Matcher": "ChangeAPIMatcher", | ||
| "paddle_api": "paddle.sparse.mask_as" | ||
| "Matcher": "ChangePrefixMatcher" |
zhwesky2010
reviewed
Mar 23, 2026
Collaborator
zhwesky2010
left a comment
There was a problem hiding this comment.
这个PR不要修改其他的单测,只需要修改你标记的API的单测:
torch.Tensor.retain_grad
torch.Tensor.sparse_mask
|
|
||
| obj = APIBase("torchvision.transforms.functional.normalize") | ||
| img_obj = ImageAPIBase("torchvision.transforms.functional.normalize") | ||
| obj = APIBase("torchvision.transforms.Normalize") |
Contributor
Author
There was a problem hiding this comment.
这个不要改,不要改动其他单测
好的
| indices = torch.tensor([[0, 1], [1, 2], [3, 0]]) # 提取两个位置 | ||
| values = torch.tensor([-1, -1]) | ||
| mask = torch.sparse_coo_tensor(indices, values, dense.size()) | ||
| result_sparse = dense.sparse_mask(mask) |
tests/test_tensor_split.py
Outdated
| @@ -1,4 +1,4 @@ | |||
| # Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. | |||
| # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |||
修改因Windows系统NTFS不区分大小写造成的问题
修复因Windows系统NTFS不区分文件大小写的错误
zhwesky2010
reviewed
Mar 24, 2026
|
|
||
| from apibase import APIBase | ||
|
|
||
| obj = APIBase("torch.tensor.sparse_mask") |
Collaborator
There was a problem hiding this comment.
torch.Tensor.sparse_mask
文件命名为test_Tensor_sparse_mask.py
zhwesky2010
approved these changes
Mar 31, 2026
Minestar6
pushed a commit
to Minestar6/PaConvert
that referenced
this pull request
Mar 31, 2026
…rch.Tensor.sparse_mask with ChangePrefix -part (PaddlePaddle#848) * Enhance capatibility with the new API * Add test singleton * Update test_tensor_sparse_mask.py * fix * fix formatting issues * Restore singleton 修改因Windows系统NTFS不区分大小写造成的问题 * Restore singleton 修复因Windows系统NTFS不区分文件大小写的错误 * Restore singleton * Restore singleton * Restore singleton * Restore singleton * Restore singleton * Restore singleton * 增加关键字测试 * Rename test_tensor_sparse_mask.py to test_Tensor_sparse_mask.py
zhwesky2010
added a commit
that referenced
this pull request
Apr 10, 2026
* first * first_1 * [API Compatibility] iinfo/cummax/cummin/diagflat/ldexp/inner/positive/rad2deg/rot90/nanquantile/neg/erf Edit By AI Agent (#858) * [API Compatibility] iinfo/cummax/cummin/diagflat/ldexp/inner/positive/rad2deg/rot90/nanquantile/neg/erf Edit By AI Agent * fix Tensor.cuda/requires_grad/ctx.saved_tensors * fix CI * add gc collect * [API Compatibility No.246, 247] align torch.Tensor.retain_grad And torch.Tensor.sparse_mask with ChangePrefix -part (#848) * Enhance capatibility with the new API * Add test singleton * Update test_tensor_sparse_mask.py * fix * fix formatting issues * Restore singleton 修改因Windows系统NTFS不区分大小写造成的问题 * Restore singleton 修复因Windows系统NTFS不区分文件大小写的错误 * Restore singleton * Restore singleton * Restore singleton * Restore singleton * Restore singleton * Restore singleton * 增加关键字测试 * Rename test_tensor_sparse_mask.py to test_Tensor_sparse_mask.py * first * first_1 * second * second * Fix CI Problem (#862) fix CI Problem * first * first_1 * [API Compatibility] iinfo/cummax/cummin/diagflat/ldexp/inner/positive/rad2deg/rot90/nanquantile/neg/erf Edit By AI Agent (#858) * [API Compatibility] iinfo/cummax/cummin/diagflat/ldexp/inner/positive/rad2deg/rot90/nanquantile/neg/erf Edit By AI Agent * fix Tensor.cuda/requires_grad/ctx.saved_tensors * fix CI * add gc collect * third * third * third * fourth * fourth_1 * fifth * sixth * seventh * sixth * seventh * eighth --------- Co-authored-by: zhwesky2010 <1183042833@qq.com> Co-authored-by: AuraWu <143194075+wuhaostudio@users.noreply.github.com>
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
New features
PR APIs