-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【Hackathon 第三期 No.4】 为 Paddle 新增 cummax API #45073
【Hackathon 第三期 No.4】 为 Paddle 新增 cummax API #45073
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
1. change "ops::CummaxGradMaker" to "ops::CummaxGradOpMaker" 2. change "ops::CumOp" to "ops::CummaxOp"
完全可以借鉴 cumsum 和 logcumsumexp 这两个API的实现,我的 forward kernel 几乎就是直接借鉴过来,只改了一行代码,其中 forward CPU kernel 似乎是没问题, 但是 forward GPU kernel 有点问题。 backward kernel 应该就需要自己理解后,完全自己写了。 |
|
||
if in_dygraph_mode(): | ||
if axis is None: axis = -1 | ||
return _C_ops.final_state_cummax(x, axis, flatten, False, False) |
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.
你好,Paddle底层过了改造,同意去掉了final_state_前缀。麻烦把这里的final_state_删掉吧~
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.
@OccupyMars2025
改造的PR见 :#45306
开发文档的改造见:#45306 (comment)
return _C_ops.cummax(x, 'flatten', flatten) | ||
else: | ||
return _C_ops.cummax(x, 'axis', axis, 'flatten', flatten) |
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.
你好,Paddle底层过了改造,以后老动态图API不再放在_C_ops,而是放在_legacy_C_ops下。辛苦这里也修改一下吧。
PR types
New features
PR changes
APIs
Describe
为 Paddle 新增 cummax API