Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vinx13 committed Jul 16, 2024
1 parent c23d027 commit 36f2cf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/relax/backend/vm/lower_runtime_builtin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class LowerRuntimeBuiltinMutator : public ExprMutator {
using ExprMutator::VisitExpr_;

Expr VisitExpr_(const CallNode* call_node) final {
static const auto& lower_builtin_fmap = Op::GetAttrMap<FLowerBuiltin>("FLowerBuiltin");
static const auto& lower_builtin_fmap = Op::GetAttrMap<FLowerBuiltin>("FLowerBuiltin");
// post-order mutation
Call call = Downcast<Call>(VisitExprPostOrder_(call_node));

Expand Down Expand Up @@ -214,7 +214,6 @@ class LowerRuntimeBuiltinMutator : public ExprMutator {
const ExternFunc builtin_to_device_{"vm.builtin.to_device"};
const ExternFunc builtin_make_closure_{"vm.builtin.make_closure"};
const ExternFunc builtin_invoke_closure_{"vm.builtin.invoke_closure"};

};

Expr LowerRuntimeBuiltin(const Expr& e) { return LowerRuntimeBuiltinMutator().VisitExpr(e); }
Expand All @@ -223,7 +222,9 @@ namespace transform {

Pass LowerRuntimeBuiltin() {
runtime::TypedPackedFunc<Function(Function, IRModule, PassContext)> pass_func =
[=](Function f, IRModule m, PassContext pc) { return Downcast<Function>(LowerRuntimeBuiltin(f)); };
[=](Function f, IRModule m, PassContext pc) {
return Downcast<Function>(LowerRuntimeBuiltin(f));
};
return CreateFunctionPass(pass_func, 0, "LowerRuntimeBuiltin", {});
}

Expand Down

0 comments on commit 36f2cf5

Please sign in to comment.