-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Negative indexing] Support negative indices for all operators in the scatter/gather series. #68780
[Negative indexing] Support negative indices for all operators in the scatter/gather series. #68780
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
…er unitest for converage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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个算子支持负数索引后即可实现)具体包括以下修改: