@@ -173,36 +173,22 @@ backend::FunctionInfo UpdateMainWorkspaceSize(const IRModule& mod, const Compila
173173 */
174174Map<Target, IRModule> GetPerTargetModules (IRModule mod);
175175
176- /* ! \brief Lower an IRModule's primitive functions to TIR.
177- *
178- * This is the "back half" of the Relay compiler which lowers "primitive functions"
179- * to TE expressions, schedules them, and then to TIR.
180- *
181- * \param module The IRModule.
182- * \param memory_plan The memory plan used during lowering
183- * \param module_name The name of this module
184- * \param process_fn Callback allowing one-level up code generators to process
185- * each function that we lower
186- * \return The lowered module, see above.
187- */
188- IRModule LowerTE (
189- const IRModule& module , backend::StaticMemoryPlan memory_plan, const String& module_name,
190- ProcessFn process_fn = [](BaseFunc f) {});
176+ inline void DefaultProcessFn (BaseFunc) {}
191177
192178/* !
193179 * \brief Pass to lower an IRModule's primitive functions to TIR.
194180 *
195181 * This is the "back half" of the Relay compiler which lowers "primitive functions"
196- * to TE expressions, schedules them, and then to TIR. It annotates all functions
197- * with their target.
182+ * to TE expressions, schedules them, and emits PrimFuncs.
198183 *
199- * \param module_name The name of this module
200- * \param process_fn Callback allowing one-level up code generators to process
201- * each function that we lower
184+ * \param module_name The name of this module, used as a prefix for generated globals.
202185 * \param config All available targets.
186+ * \param process_fn Callback allowing one-level up code generators to process
187+ * each function that we lower (default is no-op).
203188 * \returns The pass which lowers primitive functions to TIR
204189 */
205- transform::Pass LowerTEPass (String module_name, ProcessFn process_fn, CompilationConfig config);
190+ transform::Pass LowerTE (String module_name, CompilationConfig config,
191+ ProcessFn process_fn = DefaultProcessFn);
206192
207193} // namespace tec
208194} // namespace relay
0 commit comments