anijain2305 opened a new pull request #6195: URL: https://github.com/apache/incubator-tvm/pull/6195
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 * SSD reduced from 955 to 453 seconds * Faster RCNN reduced from 4630 to 1227 seconds @zhiics @masahi @kevinthesun @icemelon9 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org