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

[Paddle TensorRT No.50] Add pd_op.prelu converter #69394

Closed
wants to merge 10 commits into from

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Nov 14, 2024

PR Category

Inference

PR Types

New features

Description

  • 新增了pd_op.prelu Marker和Converter
    • 支持了 paddle.nn.Prelu 的调用方法,因为 alpha 是 builtin.parameter,会在 run start_up program 之后获取 parmeter 值,并在之后转换成为 trt.Weight 传入 op
    • paddle.nn.functional.prelu ,因为 alpha 是 Value 不进入 tensorrt
  • 【开源任务】PIR-TensorRT converter推全升级 #69178

Copy link

paddle-bot bot commented Nov 14, 2024

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

@paddle-bot paddle-bot bot added the contributor External developers label Nov 14, 2024

class TestPreluCase2TRTPattern(TensorRTBaseTest):
def setUp(self):
self.python_api = prelu_wrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

再测一下mode =all,mode= channel和mode=element的单测,参考/test/ir/inference/test_trt_convert_prelu.py,我感觉你converter写的对比prelu_op.cc少了不少,你先测下这几个属性能不能过

YuanRisheng
YuanRisheng previously approved these changes Nov 25, 2024
@YuanRisheng
Copy link
Contributor

单测再完善一下覆盖一下marker返回false的情况

Copy link

paddle-ci-bot bot commented Dec 12, 2024

Sorry to inform you that fb0b34d's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

"x": np.arange(24).reshape([2, 2, 2, 3]).astype("float32"),
"num_parameters": 2,
}
self.program_config = {"feed_list": ["x"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

加一个fp16的检测吧

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

paddle-ci-bot bot commented Dec 26, 2024

Sorry to inform you that 18791b9's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants