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

Method from_expr

python/tvm/ir/module.py:199–218  ·  view source on GitHub ↗

Construct a module from a standalone expression. Parameters ---------- expr: RelaxExpr The starting expression global_funcs: Optional[dict] Map of global vars to function definitions Returns ------- mod: Module

(expr, functions=None)

Source from the content-addressed store, hash-verified

197
198 @staticmethod
199 def from_expr(expr, functions=None):
200 """Construct a module from a standalone expression.
201
202 Parameters
203 ----------
204 expr: RelaxExpr
205 The starting expression
206
207 global_funcs: Optional[dict]
208 Map of global vars to function definitions
209
210 Returns
211 -------
212 mod: Module
213 A module containing the passed definitions,
214 where expr is set as the entry point
215 (wrapped in a function if necessary)
216 """
217 funcs = functions if functions is not None else {}
218 return _ffi_api.Module_FromExpr(expr, funcs)
219
220 def get_attr(self, attr_key):
221 """Get the IRModule attribute.

Callers 15

prepare_cpu_libFunction · 0.80
prepare_gpu_libFunction · 0.80
profile_relax_functionFunction · 0.80
parseFunction · 0.80
benchmarkFunction · 0.80
buildFunction · 0.80
_run_exprFunction · 0.80
test_rpc_moduleFunction · 0.80
test_rpc_moduleFunction · 0.80
test_rhs_batchedFunction · 0.80
test_multiple_combineFunction · 0.80
test_checkFunction · 0.80

Calls

no outgoing calls

Tested by 15

prepare_cpu_libFunction · 0.64
prepare_gpu_libFunction · 0.64
test_rpc_moduleFunction · 0.64
test_rpc_moduleFunction · 0.64
test_rhs_batchedFunction · 0.64
test_multiple_combineFunction · 0.64
test_checkFunction · 0.64
test_recursiveFunction · 0.64
test_if_non_seq_bodyFunction · 0.64