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

Function full_func_loader

imperative/python/megengine/traced_module/compat.py:294–314  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

292
293@register_functional_loader(("megengine.functional.tensor", "full"))
294def full_func_loader(expr):
295 kwargs = expr.kwargs
296 args = expr.args
297 if not hasattr(expr, "version"):
298
299 def orig_full_signature(shape, value, dtype=None, device=None):
300 pass
301
302 args, kwargs = _convert_kwargs_to_args(
303 orig_full_signature, expr.args, expr.kwargs
304 )
305 expr.set_args_kwargs(*args, **kwargs)
306 if len(args) == 4:
307 device = args[-1]
308 dtype = args[-2]
309 args = args[: len(args) - 2]
310
311 kwargs["dtype"] = dtype
312 kwargs["device"] = device
313
314 expr.set_args_kwargs(*args, **kwargs)
315
316
317@register_functional_loader(("megengine.functional.nn", "conv_transpose2d"))

Callers

nothing calls this directly

Calls 2

_convert_kwargs_to_argsFunction · 0.85
set_args_kwargsMethod · 0.80

Tested by

no test coverage detected