MCPcopy Create free account
hub / github.com/apache/tvm-ffi / register

Function register

python/tvm_ffi/error.py:247–252  ·  view source on GitHub ↗

Register the error class name with the FFI core.

(mycls: type)

Source from the content-addressed store, hash-verified

245 name_or_cls = cls.__name__
246
247 def register(mycls: type) -> type:
248 """Register the error class name with the FFI core."""
249 err_name = name_or_cls if isinstance(name_or_cls, str) else mycls.__name__
250 core.ERROR_NAME_TO_TYPE[err_name] = mycls
251 core.ERROR_TYPE_TO_NAME[mycls] = err_name
252 return mycls
253
254 if cls is None:
255 return register

Callers 1

register_errorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected