[Paddle-Inference] add Paddle Trt config: with_interleaved #38884
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Describe
增加TRT config的配置接口:void UpdateConfigInterleaved(paddle_infer::Config* c, bool with_interleaved),用于量化推理 int8的特殊数据排布;
需要支持 同一种模型,有多种推理行为,所以可以在trt config中配置不同属性,实现多种混合精度的推理
1、针对ernie int8的oss plugin中需要interleaved的数据排布,所以增加 with_interleaved的配置接口
2、在pass中根据interleaved的属性选择不同的 op 融合方式;在convertor中根据with_interleaved的属性选择不同的oss plugin
3、根据interleaved的属性,提前对op输入进行处理
修复op_convert只能为一个输出tensor设置dynamic_ranged,现在可以设置多个输出;
给一些layer设置名字,方便debug