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

Method with_attr

python/tvm/ir/module.py:236–253  ·  view source on GitHub ↗

Copy the IRModule and add an attribute to it. Parameters ---------- attr_key : str The attribute key. attr_value : Object The new attribute value. Returns ------- mod : IRModule A new copy of the IRModule

(self, attr_key, attr_value)

Source from the content-addressed store, hash-verified

234 return _ffi_api.Module_GetAttr(self, attr_key)
235
236 def with_attr(self, attr_key, attr_value):
237 """Copy the IRModule and add an attribute to it.
238
239 Parameters
240 ----------
241 attr_key : str
242 The attribute key.
243
244 attr_value : Object
245 The new attribute value.
246
247 Returns
248 -------
249 mod : IRModule
250 A new copy of the IRModule with the attribute
251 """
252
253 return _ffi_api.Module_WithAttr(self, attr_key, attr_value)
254
255 def without_attr(self, attr_key: str) -> "IRModule":
256 """Copy the IRModule and remove an attribute key and its associated value.

Callers 15

_normalize_modFunction · 0.95
_checkFunction · 0.95
prepare_cpu_libFunction · 0.45
prepare_gpu_libFunction · 0.45
emit_func_outputMethod · 0.45
_relax_backendFunction · 0.45
_captureFunction · 0.45
from_fxMethod · 0.45
from_exported_programMethod · 0.45
_merge_state_inplaceFunction · 0.45
tree_attnFunction · 0.45

Calls

no outgoing calls

Tested by 15

_checkFunction · 0.76
prepare_cpu_libFunction · 0.36
prepare_gpu_libFunction · 0.36
test_rpc_moduleFunction · 0.36
test_rpc_moduleFunction · 0.36
verifyFunction · 0.36
gen_modFunction · 0.36
test_simpleFunction · 0.36
test_biasFunction · 0.36
test_activationFunction · 0.36
test_bias_activationFunction · 0.36