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

Function canonicalize_arg

imperative/python/megengine/xla/dtype.py:104–109  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

102
103
104def canonicalize_arg(x):
105 typ = type(x)
106 handler = canonicalize_args_handlers.get(typ)
107 if handler:
108 return handler(x)
109 raise TypeError(f"No canonicalize_dtype handler for type: {type(x)}")

Callers 2

_shard_argFunction · 0.85
_device_put_implFunction · 0.85

Calls 2

handlerFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected