未验证 提交 7a85ced3 编写于 作者: Z zhoutianzi666 提交者: GitHub

[Paddle-TRT] Fix cast (#44312)

* fix_cast

* fix_cast

* commit
上级 5c291737
...@@ -2061,6 +2061,10 @@ bool OpTeller::Tell(const framework::ir::Node* node, ...@@ -2061,6 +2061,10 @@ bool OpTeller::Tell(const framework::ir::Node* node,
} }
if (op_type == "cast") { if (op_type == "cast") {
// trt 6015 result in Windows ppyolo_mbv3 TRT fp32 diff
#if !IS_TRT_VERSION_GE(7000)
return false;
#endif
int in_dtype = BOOST_GET_CONST(int, desc.GetAttr("in_dtype")); int in_dtype = BOOST_GET_CONST(int, desc.GetAttr("in_dtype"));
int out_dtype = BOOST_GET_CONST(int, desc.GetAttr("out_dtype")); int out_dtype = BOOST_GET_CONST(int, desc.GetAttr("out_dtype"));
if ((in_dtype == 4 || in_dtype == 5) && out_dtype == 4) { if ((in_dtype == 4 || in_dtype == 5) && out_dtype == 4) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册