Skip to content
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

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

anijain2305
Copy link
Contributor

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

@@ -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"]
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@kevinthesun kevinthesun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinthesun kevinthesun merged commit d279991 into apache:master Feb 4, 2020
@kevinthesun
Copy link
Contributor

Thanks @anijain2305

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs.

* Bring back strided_slice.

* Replace tvm.nd change.
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs.

* Bring back strided_slice.

* Replace tvm.nd change.
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
* [AutoTVM] Minor bug fixes in AutoTVM for QNN graphs.

* Bring back strided_slice.

* Replace tvm.nd change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants