-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Disable trt op by output var #49497
Disable trt op by output var #49497
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -694,7 +694,8 @@ struct PD_INFER_DECL AnalysisConfig { | |||
/// \brief Prevent ops running in Paddle-TRT | |||
/// NOTE: just experimental, not an official stable API, easy to be broken. | |||
/// | |||
void Exp_DisableTensorRtOPs(const std::vector<std::string>& ops); | |||
void Exp_DisableTensorRtOPs(const std::vector<std::string>& ops, |
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.
修改下注释,可以描述地更详细些~
@@ -694,7 +694,8 @@ struct PD_INFER_DECL AnalysisConfig { | |||
/// \brief Prevent ops running in Paddle-TRT | |||
/// NOTE: just experimental, not an official stable API, easy to be broken. | |||
/// | |||
void Exp_DisableTensorRtOPs(const std::vector<std::string>& ops); | |||
void Exp_DisableTensorRtOPs(const std::vector<std::string>& ops, |
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.
新增了默认参数,python api bind没有更新吧?使用应该会报错
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.
如果遇到了这样的case,应该比较难定位和发现问题,是否有warning信息或者把涉及到的相关算子都规范为同样的行为(如都进trt或都不进trt) |
b0b5d7f
to
9fa4592
Compare
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.
LGTM
PR types
Others
PR changes
Others
Describe
扩展接口 AnalysisConfig::Exp_DisableTensorRtOPs;
原接口支持传入 op names 禁用某一类 op;
扩展后,支持通过指定输出 var 的 name,禁用某个 op。
使用方法:
config.Exp_DisableTensorRtOPs({"op_name", "output_var_name"});
TODO:
修改官网文档说明。