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

【SCU】【Paddle TensorRT No.24】Add pd_op.minimum converter #69736

Merged
merged 12 commits into from
Dec 18, 2024

Conversation

PolaKuma
Copy link
Contributor

PR Category

User Experience

PR Types

New features

Description

新增了 pd_op.minimum Marker和Converter

Copy link

paddle-bot bot commented Nov 26, 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 26, 2024
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Nov 27, 2024
def minimum_converter(network, paddle_op, inputs):
x = inputs[0]
y = inputs[1]
x, y = broadcast(network, x, y, a_name="x", b_name="y")
Copy link
Contributor

Choose a reason for hiding this comment

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

这个不是拓展,是swap吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我看官方的文档就是先广播再逐元素取小咧
Screenshot 2024-11-27 at 14 36 08

Copy link
Contributor

Choose a reason for hiding this comment

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

你看旧ir怎么写的

y = inputs[1]
x, y = broadcast(network, x, y, a_name="x", b_name="y")
min_layer = network.add_elementwise(x, y, trt.ElementWiseOperation.MIN)
min_layer.name = f"{x.name}_minimum_{y.name}"
Copy link
Contributor

Choose a reason for hiding this comment

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

这个不需要加名字

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@PolaKuma PolaKuma requested a review from lizexu123 December 3, 2024 06:12
lizexu123
lizexu123 previously approved these changes Dec 4, 2024
@luotao1
Copy link
Contributor

luotao1 commented Dec 4, 2024

冲突了

luotao1
luotao1 previously approved these changes Dec 4, 2024
@@ -410,6 +410,7 @@ def test_trt_result(self):

class TestMinimumBroadcastTRTPattern(TensorRTBaseTest):
def setUp(self):
self.python_api = paddle.minimum
Copy link
Contributor

Choose a reason for hiding this comment

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

这怎么又测minimum,又测maximum的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里PR单测名错了,应该是Maximum,需要那边同学重新改一下。我这边仍然用Minimum。https://github.com/PaddlePaddle/Paddle/pull/69835/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我这边一起改了

这怎么又测minimum,又测maximum的

Copy link
Contributor

Choose a reason for hiding this comment

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

这里再加一个测fp16的单测吧

@PolaKuma PolaKuma requested review from luotao1 and lizexu123 December 5, 2024 09:26
Copy link

paddle-ci-bot bot commented Dec 14, 2024

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

@PolaKuma
Copy link
Contributor Author

@lizexu123 这个应该可以了

@lizexu123 lizexu123 merged commit df36407 into PaddlePaddle:develop Dec 18, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants