-
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
【SCU】【Paddle TensorRT No.23】Add pd_op.elementwise_pow
converter
#69580
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -65,6 +65,7 @@ DEFINE_GENERAL_PATTERN(Fused_gemm_epilogue, | |||
paddle::dialect::FusedGemmEpilogueOp) | |||
DEFINE_GENERAL_PATTERN(Layer_norm, paddle::dialect::LayerNormOp) | |||
DEFINE_GENERAL_PATTERN(Add, paddle::dialect::AddOp) | |||
DEFINE_GENERAL_PATTERN(Pow, paddle::dialect::PowOp) |
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::dialect::ElementwisePowOp
|
||
|
||
@converter_registry.register("pd_op.elementwise_pow", trt_version="8.x") | ||
def elementwise_pow_converter(network, paddle_op, inputs): |
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.
这两个写成一个,并且不要复用这个函数,自己按照elementwise_op.cc中写一个
@@ -95,6 +95,21 @@ def test_trt_result(self): | |||
self.check_trt_result() | |||
|
|||
|
|||
class TestPowTRTPattern(TensorRTBaseTest): | |||
def setUp(self): |
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.pow,其实是elementwise_pow,https://github.com/PaddlePaddle/Paddle/blob/release/3.0-beta/python/paddle/tensor/math.py#L474可参考
注意pd_op.pow和pd_op.elementwise_pow是俩个算子,pd_op.pow是一个输入Tensor,pd_op.elementwise_pow是俩个输入Tensor,如果你的pr实现的是pd_op.elementwise_pow,那对应注册converter的时候需要注册pd_op.elementwise_pow |
好的,感谢纠正,我再修改一下 |
Sorry to inform you that b833b7c's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@lizexu123 老师这个还需要您review下~ |
PR Category
User Experience
PR Types
New features
Description
新增了
pd_op.elementwise_pow
Marker和Converter