MCPcopy Create free account
hub / github.com/apache/tvm / transform_module

Method transform_module

python/tvm/relax/transform/fast_math.py:59–65  ·  view source on GitHub ↗
(self, mod: IRModule, ctx: tvm.transform.PassContext)

Source from the content-addressed store, hash-verified

57 """
58
59 def transform_module(self, mod: IRModule, ctx: tvm.transform.PassContext) -> IRModule:
60 fast_math_codegen = FastMathCodeGenerator(mod)
61 for gv, func in mod.functions_items():
62 if isinstance(func, tvm.relax.Function):
63 func = fast_math_codegen.visit_expr(func)
64 fast_math_codegen.builder_.update_func(gv, func)
65 return fast_math_codegen.builder_.get()

Callers

nothing calls this directly

Calls 5

functions_itemsMethod · 0.80
visit_exprMethod · 0.45
update_funcMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected