lhutton1 opened a new pull request #10599: URL: https://github.com/apache/tvm/pull/10599
Refactors the Relay to TIR python hook for the NPU so that optimizations can be applied across the whole module and not just functions that will be offloaded to the NPU. A pass `OutlineCompilerFunctions` is introduced to outline NPU functions, which now happens before optimization passes are run (this previously happened after the prim_func had been created). In addition, optimization passes that should only run on NPU functions are now limited to running on outlined functions for the NPU (by checking the "Compiler" attribute). To help avoid code duplication, a helpful decorator `npu_pass` has been created for python passes that should only run on NPU functions. This refactor helps move a number of passes in the microNPU codegen to use an IRModule -> IRModule philosophy. cc @manupa-arm @ekalda @NicolaLancellotti @dchauhan-arm -- 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]
