-
Notifications
You must be signed in to change notification settings - Fork 3.8k
GraphExecutor: Fix wild pointer assign when input and output are reshape #15121
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
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
echuraev
left a comment
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.
Could you please add correspondent unit tests?
|
echuraev
left a comment
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.
|
|
||
| if (param.func_name == "__nop") { | ||
| return {[]() {}, arg_ptr}; | ||
| return {[arg_ptr]() {}, arg_ptr}; |
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.
What is the reason of capturing arg_ptr in empty lambda?
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.
IMHO, I would say that better use zero instead of 0 in the name of the file, e.g test_reshape_zero_copy.py.
Also, probably you can move this test to the file with existing tests on zero_copy.
echuraev
left a comment
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.
In general LGTM. Just a couple of moments which were described in previous comment.
|
oh also @vinx13 was involved sorry, forgot to mention |
|
@corehalt The PR needs to resolve the conflict. Feel free to take over this PR and create a new one. |
|
Yes it's fine. |
If reshape in our relay expression, like reshape + matmul expr, when we use set_input_zero_copy or set_output_zero_copy,the result goes wrong.