-
Notifications
You must be signed in to change notification settings - Fork 3.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
Fix SegFault bug in shape inference #5990
Conversation
Signed-off-by: opluss <opluss@qq.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5990 +/- ##
==========================================
+ Coverage 56.81% 56.82% +0.01%
==========================================
Files 506 506
Lines 30357 30365 +8
Branches 4589 4590 +1
==========================================
+ Hits 17246 17254 +8
Misses 12283 12283
Partials 828 828 ☔ View full report in Codecov by Sentry. |
Signed-off-by: opluss <opluss@qq.com>
Signed-off-by: opluss <opluss@qq.com>
Signed-off-by: opluss <opluss@qq.com>
Signed-off-by: opluss <opluss@qq.com>
@cjvolzka @gramalingam may be worthy to be included in 1.16 since this is fixing a memory error. |
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.
The check can be made more general, as suggested in comments. But it's ok to merge this as is too, if we want to get this into the upcoming release.
@justinchuby I can wait to cut rc2 until this has been cherry-picked into the |
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
I am going to merge as is for us to fix the bug, and then allow the author to create a follow-up. |
### Description Cherry-pick #5990 into `rel-1.16.0` branch The bug is SegFault during shape inference if the schema not be set inference function. The schema has `CheckInputOutputType` for shape inference and `Verify` for raw node proto. And the behavior is not fully aligned. ### Motivation and Context fixes #5989 --------- Signed-off-by: opluss <opluss@qq.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
### Description Cherry-Pick #5990 into `rel-1.16.0` branch The bug is SegFault during shape inference if the schema not be set inference function. The schema has `CheckInputOutputType` for shape inference and `Verify` for raw node proto. And the behavior is not fully aligned. ### Motivation and Context fixes #5989 Signed-off-by: opluss <opluss@qq.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com> Co-authored-by: oPluss <opluss@qq.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
### Description The bug is SegFault during shape inference if the schema not be set inference function. The schema has `CheckInputOutputType` for shape inference and `Verify` for raw node proto. And the behavior is not fully aligned. ### Motivation and Context fixes onnx#5989 --------- Signed-off-by: opluss <opluss@qq.com> Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: isdanni <leedanni@gmail.com>
### Description - Add `OpSchema::VerifyInputNum` and `OpSchema::VerifyOutputNum` methods. The logic has been moved from `OpSchema::Verify`. - Replaced the input/output number check logic in `OpSchema::CheckInputOutputType` with calls to the new interfaces. - Without using the `Node(domain::op_type::version)` string pattern in `OpSchema::CheckInputOutputType` when calling `fail_check`, as the `op_type` will be displayed by the shape inference common exception. Otherwise, it would appear redundant. ### Motivation and Context follow-up #5990 resolve #5993 --------- Signed-off-by: opluss <opluss@qq.com>
Description
The bug is SegFault during shape inference if the schema not be set inference function.
The schema has
CheckInputOutputType
for shape inference andVerify
for raw node proto. And the behavior is not fully aligned.Motivation and Context
fixes #5989