MCPcopy Index your code
hub / github.com/apache/tvm / transform_module

Method transform_module

python/tvm/relax/backend/dispatch_sampling.py:87–93  ·  view source on GitHub ↗
(self, mod: IRModule, ctx: PassContext)

Source from the content-addressed store, hash-verified

85 """Pass to dispatch scan and sort operators to platform dependent implementation."""
86
87 def transform_module(self, mod: IRModule, ctx: PassContext) -> IRModule:
88 sampling_dispatcher = SamplingDispatcher(mod)
89 for gv, func in mod.functions_items():
90 if isinstance(func, relax.Function):
91 func = sampling_dispatcher.visit_expr(func)
92 sampling_dispatcher.builder_.update_func(gv, func)
93 return sampling_dispatcher.builder_.finalize()

Callers

nothing calls this directly

Calls 5

SamplingDispatcherClass · 0.85
functions_itemsMethod · 0.80
visit_exprMethod · 0.45
update_funcMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected