tkonolige commented on pull request #10474: URL: https://github.com/apache/tvm/pull/10474#issuecomment-1058716240
@comaniac My goal with this PR was the fix the issue that some codepaths use the tophub context and some do not. This leads the really confusing results where `VMCompiler.optimize` and `VMCompiler.lower` result in different lowered functions (usually different layouts due to alter op layout). I see three ways to make everything consistent: 1. Require users to manually use tophub (this PR). It seems like this approach may have a negative performance impact if the user is not using tuned schedules. 2. Use tophub as the default context when no other context has been specified. This will make `VMCompiler.optimize` and `VMCompiler.lower` consistent in their results. On the other hand, some alteroplayout code may no longer fire correctly because it depends on a fallback context (unclear if it was even correct in the first place). 3. Add `with tophub` to `VMCompiler.optimize`. This doesn't solve the underlying problem. I expect us see more inconsistent results in other parts of the codebase where tophub is not used. 1. or 2. appear to be the best solutions. Do you prefer 2. over 1.? If so, I will submit a PR with that change. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
