-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[AutoTVM] Minor bug fixes in AutoTVM for QNN graphs #4797
Conversation
@@ -73,7 +73,7 @@ def is_boundary_node(node_entry, input_names): | |||
# Operators dependent on original layouts. | |||
_LAYOUT_FIXED_OP = ["batch_flatten", "transpose", "reshape", | |||
"multibox_prior", "multibox_transform_loc", "where", | |||
"non_max_suppression", "strided_slice"] |
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.
Why do we want to change this?
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.
This was causing problem in quantized mobilenet conv2d. QNN inserts strided slice for quantized conv2d. This caused many strided slice, and somehow graph tuning dependency map generation was incorrect. We already have a stridedSliceInferLayout attritbute, so I don't think this is required. But, let me know, I dont fully understand the graph tuner dependency collection code yet. If you know, why this is here, I can also test the changes.
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.
After talking to Yao, we decided to solve it in a different manner. It might work for the case that I experienced with QNN, but might fail in other cases. We will revisit this.
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
Thanks @anijain2305 |
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs. * Bring back strided_slice. * Replace tvm.nd change.
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs. * Bring back strided_slice. * Replace tvm.nd change.
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs. * Bring back strided_slice. * Replace tvm.nd change.
I encountered many bugs during autotuning, both kernel and graph, for a QNN graph. This PR adds fixes all the minor bugs.
There is one major implementation remaining for fixing the graph tuner. More on that in a separate PR.
@icemelon9 @yzhliu @kevinthesun