MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / make

Method make

imperative/python/megengine/traced_module/expr.py:333–340  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

331
332 @classmethod
333 def make(cls, *args, **kwargs):
334 assert active_module_tracer() is not None
335 current_graph = active_module_tracer().current_scope()
336 expr = cls(*args, **kwargs)
337 out_node = expr.outputs[0]
338 current_graph._namespace.auto_naming_for_outputs(expr)
339 current_graph._add_input(out_node)
340 return expr.outputs[0]
341
342 def __repr__(self):
343 return "%{}:\t{} = Input()".format(self._id, self.outputs[0])

Callers 11

_module_trace_captureFunction · 0.45
wraped_fnFunction · 0.45
wrapped_fnFunction · 0.45
mark_constantMethod · 0.45
__call__Method · 0.45
wrapMethod · 0.45
__getattr__Method · 0.45
__getattribute__Method · 0.45
trace_moduleFunction · 0.45
_as_const_nodeFunction · 0.45

Calls 4

active_module_tracerFunction · 0.85
current_scopeMethod · 0.80
_add_inputMethod · 0.80

Tested by

no test coverage detected