Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
104
def
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_arg
Function · 0.85
_device_put_impl
Function · 0.85
Calls
2
handler
Function · 0.85
get
Method · 0.45
Tested by
no test coverage detected