MCPcopy Index your code
hub / github.com/apache/tvm / with_attrs

Method with_attrs

python/tvm/ir/module.py:269–283  ·  view source on GitHub ↗

Copy the IRModule and add the given attribute map to it. Parameters ---------- attr_map: Union[DictAttrs, Dict[str, Object]] The attribute map Returns ------- mod : IRModule A new copy of the IRModule with the attribute

(self, attr_map: DictAttrs | dict[str, Object])

Source from the content-addressed store, hash-verified

267 return _ffi_api.Module_WithoutAttr(self, attr_key)
268
269 def with_attrs(self, attr_map: DictAttrs | dict[str, Object]) -> "IRModule":
270 """Copy the IRModule and add the given attribute map to it.
271 Parameters
272 ----------
273 attr_map: Union[DictAttrs, Dict[str, Object]]
274 The attribute map
275 Returns
276 -------
277 mod : IRModule
278 A new copy of the IRModule with the attribute
279 """
280 if isinstance(attr_map, tvm.ir.DictAttrs):
281 attr_map = attr_map._dict()
282
283 return _ffi_api.Module_WithAttrs(self, attr_map)

Callers 15

handle_conv2dMethod · 0.45
handle_decode_matmulMethod · 0.45
handle_matmulMethod · 0.45
handle_attentionMethod · 0.45
handle_normMethod · 0.45
gen_call_tir_inputsFunction · 0.45
from_onnxMethod · 0.45
from_tfliteFunction · 0.45
transform_moduleMethod · 0.45
beforeFunction · 0.45
expectedFunction · 0.45
test_labeled_impureFunction · 0.45

Calls 1

_dictMethod · 0.80

Tested by 7

beforeFunction · 0.36
expectedFunction · 0.36
test_labeled_impureFunction · 0.36
test_force_pureFunction · 0.36
test_force_pure_improperFunction · 0.36