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])
| 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) |