Skip to content
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 78】为Paddle-TRT增加cumsum算子 #52518

Merged
merged 6 commits into from
Apr 12, 2023

Conversation

gzy19990617
Copy link
Contributor

@gzy19990617 gzy19990617 commented Apr 4, 2023

PR types

Others

PR changes

Others

Describe

paddle文档对于cumsum算子的定义:
image
使用TRT中的addLoop层,将每次循环的输出拼接起来,得到最后cumsum的结果。
python单测通过:
截屏2023-04-04 15 51 50的副本
由于在opmaker的时候,axis会默认设为-1,所以op_teller里没有增加有关axis的判断。
3a060ba10e2aa70a3d572c18260dbd8e

@paddle-bot
Copy link

paddle-bot bot commented Apr 4, 2023

你的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.

Comment on lines 152 to 155
self.trt_param.precision = paddle_infer.PrecisionType.Float32
yield self.create_inference_config(), (1, 2), 1e-5
self.trt_param.precision = paddle_infer.PrecisionType.Half
yield self.create_inference_config(), (1, 2), 1e-2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不能写死(1,2),需要根据trt版本进行判断。目前windows ci是trt 7.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

Copy link
Contributor

@zhangjun zhangjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 2309aa5 into PaddlePaddle:develop Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants