MCPcopy Create free account
hub / github.com/apache/tvm / _op_wrapper

Function _op_wrapper

python/tvm/tirx/script/builder/ir.py:2952–2964  ·  view source on GitHub ↗
(func: Callable[P, T])

Source from the content-addressed store, hash-verified

2950
2951
2952def _op_wrapper(func: Callable[P, T]) -> Callable[P, T]:
2953 @functools.wraps(func)
2954 def wrapped(*args, **kwargs) -> T:
2955 if "dtype" in kwargs:
2956 kwargs.pop("dtype")
2957 return func(*args, **kwargs)
2958
2959 # Expose underlying tir op name for printer registration
2960 try:
2961 wrapped.__tir_op_name__ = getattr(func, "__name__", None)
2962 except Exception: # pragma: no cover
2963 pass
2964 return wrapped
2965
2966
2967def _dtype_forward(func):

Callers 15

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__call__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…