-
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
[Paddle-TRT] Add check for TRT runtime dynamic shape #32155
[Paddle-TRT] Add check for TRT runtime dynamic shape #32155
Conversation
Thanks for your contribution! |
@@ -76,6 +76,53 @@ static void RuntimeStaticShapeCheck(std::vector<int64_t> runtime_input_shape, | |||
model_input_shape_str, runtime_input_shape_str)); | |||
} | |||
|
|||
static void RuntimeDynamicShapeCheck(std::string x, |
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.
输入参数用const &
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.
done
"TRT engine runtime input dims size(%d) inconsistent " | ||
"with the dynamic shape size(%d)", | ||
runtime_input_shape.size(), min_input_shape.size())); | ||
auto is_input_shape_valid = [&](std::vector<int64_t> runtime_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.
同上
self.check_output_with_option(use_gpu) | ||
|
||
|
||
class TRTDynamicShapeOutOfBound2Test(TRTDynamicShapeTest): |
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.
增加lower bound测试case
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
… check-trt-runtime-dynamic-shape
PR types
Function optimization
PR changes
Others
Describe
explicitly hints how runtime input shapes of TRT engines are inconsistent with min/max input shapes configured in
SetTRTDynamicShapeInfo()
. The error message is like: