You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
HydrogenSulfate
changed the title
[Negtive indexing] Support negtive index value for several kernels
[Negative indexing] Support negtive index value for several kernels
Oct 17, 2024
HydrogenSulfate
changed the title
[Negative indexing] Support negtive index value for several kernels
[Negative indexing] Support negative indices for all operators in the scatter/gather series.
Oct 18, 2024
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 Category
User Experience
PR Types
Bug fixes
Description
Pcard-75624
相关PR:deepmodeling/deepmd-kit#4157
为数据操作/索引操作类的算子及其反向算子支持负数索引(即从仅支持$[0, S)$ 内的非负整数,升级为支持 $[-S, S)$ 范围内的所有整数作为索引值, $S$ 表示运算输入x的形状在axis维度上的大小,即索引值的上限),以及修复负数axis的支持(个别算子对axis为-1这种负数没有处理逻辑导致报错,这里统一修复了),具体包括以下7个算子:
Tensor.__getitem__
(上述6个算子支持负数索引后即可实现)具体包括以下修改: