-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Paddle Tensorrt] add tensorrt converter and marker #69208
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
VLOG(3) << "Tanh op does not support 0 dim input when TensorRT < 8.6."; | ||
return 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.
这个是tanh还是equal?
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.
已修改
#else | ||
if (hasAttr && dtype != phi::DataType::FLOAT32 && | ||
dtype != phi::DataType::FLOAT64 && dtype != phi::DataType::INT32 && | ||
dtype != phi::DataType::INT64) { | ||
VLOG(3) | ||
<< "the pd_op.full_like only supports int32/int64/float32/float64 by" | ||
"trt8.4 below"; | ||
return false; | ||
} | ||
if (!hasAttr) { | ||
if (!x_dtype.isa<pir::Float32Type>() && | ||
!x_dtype.isa<pir::Float64Type>() && !x_dtype.isa<pir::Int32Type>() && | ||
!x_dtype.isa<pir::Int64Type>()) { | ||
VLOG(3) << "the pd_op.full_like only supports " | ||
"int32/int64/float32/float64 by" | ||
"trt8.4 below"; | ||
return false; | ||
} | ||
} | ||
#endif |
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.
这段逻辑删了吧,后续我们默认的trt版本应该就是8.4以上的了
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.
已删除
@@ -23,6 +23,8 @@ | |||
|
|||
@converter_registry.register("pd_op.greater_than", trt_version="8.x") | |||
@converter_registry.register("pd_op.less_than", trt_version="8.x") | |||
@converter_registry.register("pd_op.equal", trt_version="8.x") | |||
@converter_registry.register("pd_op.not_equal", trt_version="8.x") | |||
def logic_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.
把这里的逻辑重构一下吧,也改成映射的形式,参考activation相关converter的做法
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.
已重构
PR Category
Inference
PR Types
New features
Description
card-71500
添加equal 、not_equal、floor_div、bmm、full_like、silu、swish、floor、log的marker、converter和单测