MasterJH5574 opened a new pull request, #14634: URL: https://github.com/apache/tvm/pull/14634
This PR introduces the `enable_warning` argument for the LegalizeOps pass and the MetaScheduleApplyDatabase pass. These two passes now will emit warnings only when the `enable_warning` argument is true. We introduce this because in our recent development of [Web LLM](https://github.com/mlc-ai/web-llm), we leverage three passes to generate the GPU code for the TIR functions in a given IRModule. The passes are MetaScheduleDatabaseApply, DispatchTIROperator (one pass that substitutes a TIR func with another handmade one or hand-scheduled one), and DefaultGPUSchedule, in order. (https://github.com/mlc-ai/web-llm/blob/514f6e3132f91a2460f012a74861cd57b43560fb/build.py#L157-L161) In this case (and most of the cases), we always have the DefaultGPUSchedule pass as a safe guard, and it is common and often that one TIR function does not exist in the MetaSchedule database. For this reason, always printing warning is not ideal and can be too much and annoying for both users and developers. The same reason applies to LegalizeOps as well. In our practice of WebLLM, we bring in some high-level operator that is not intended to be legalized (of course, it does not have a legalization function). Always printing the warnings is also not expected as well. According to these experiences, we try to introduce a new argument for configuring the behavior of if emitting warnings or not. -- 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]
