CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Paddle TensorRT No.6-7] Add pd_op.affine_channel,pd_op.numel converter #70507
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提交成功,感谢你对开源项目的贡献! |
cmake/third_party.cmake
Outdated
if(WITH_OPENVINO) | ||
execute_process( | ||
COMMAND git submodule update --init third_party/openvino | ||
WORKING_DIRECTORY ${PADDLE_SOURCE_DIR} | ||
RESULT_VARIABLE result_var) | ||
# List of modules to be deleted | ||
set(delete_module | ||
"thirdparty/zlib/zlib" |
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.
修改这个的原因是?
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,没这个编译过不了
python/paddle/tensorrt/converter.py
Outdated
# input_config.min_input_shape is a dictionary, and the values of input_config.min_input_shape are not nested lists | ||
if self.trt_config and i < len(self.trt_config.inputs): | ||
input_config = self.trt_config.inputs[i] | ||
if isinstance( | ||
input_config.min_input_shape, dict | ||
) and not any( | ||
isinstance(v, list) | ||
for v in input_config.min_input_shape.values() | ||
): | ||
min_shape = next( | ||
iter(input_config.min_input_shape.values()) | ||
) | ||
opt_shape = next( | ||
iter(input_config.optim_input_shape.values()) | ||
) | ||
max_shape = next( | ||
iter(input_config.max_input_shape.values()) | ||
) | ||
# input_config.min_input_shape is a Dictionary | ||
elif isinstance(input_config.min_input_shape, dict): | ||
min_shape = get_value_shape_range_info( | ||
value, False, paddle.base.core.ShapeMode.kMIN | ||
) | ||
opt_shape = get_value_shape_range_info( | ||
value, False, paddle.base.core.ShapeMode.kOPT | ||
) | ||
max_shape = get_value_shape_range_info( | ||
value, False, paddle.base.core.ShapeMode.kMAX | ||
) | ||
else: | ||
min_shape = input_config.min_input_shape | ||
opt_shape = input_config.optim_input_shape | ||
max_shape = input_config.max_input_shape |
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的场景下没bug吗
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.
适配的单测,和测试模型的场景
… pir-affine_channel
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 for new executor
PR Category
Inference
PR Types
New features
Description
card-71500
添加了pd_op.affine_channel converter,对于旧ir-trt,多了NHWC的支持,以及修改用户即使设置了opt_shape,内部其实设置的min_shape,导致TensorRT可能会对opt_shape的优化不够。添加了pd_op.numel converter,修改了收集shape的bug