-
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
[FoldConstant] Create Interpreter for each constant subgraph #6195
Conversation
This look right. |
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.
Thanks for the fix. lgtm
Thanks @anijain2305 @MarisaKirisame |
It is consistent with your findings |
Interestingly this PR seems to have introduced a bug in the VTA image classification example: https://github.com/apache/incubator-tvm/commits/master/vta/tutorials/frontend/deploy_classification.py To reproduce you can go back to Edit the config.cmake lines to run the VTA simulator:
Go to
|
This is related to https://discuss.tvm.ai/t/vm-slow-compilation-of-tf-object-detection-models/7479
For TF object detection models, a module has many functions (TF SSD mobilenet has 48), where a couple of functions are pretty huge (more than 10k call nodes). FoldConstant, because it is a function pass, is called for each function in the module. However, FoldConstant also creates an Interpreter on every invocation, which currently is based on the full mod and therefore expensive.
This PR creates an interpreter for each constant subgraph. I am not sure if this is the right way. The purpose of this PR is to start a discussion and identify if there is some other higher-level design issue that needs to be resolved.
With this PR, compilation time of
@zhiics @masahi @kevinthesun @icemelon9