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

Method replace

python/tvm/tirx/stmt.py:1005–1034  ·  view source on GitHub ↗

Return a copy of this call with selected fields replaced. Every field that is not overridden in ``changes`` is preserved from ``self`` (including ``scope``), so rebuilds never silently drop fields. The returned node is downcast to the registered subclass for ``op``.

(self, **changes: Any)

Source from the content-addressed store, hash-verified

1003 return new_instance
1004
1005 def replace(self, **changes: Any) -> "TilePrimitiveCall":
1006 """Return a copy of this call with selected fields replaced.
1007
1008 Every field that is not overridden in ``changes`` is preserved from
1009 ``self`` (including ``scope``), so rebuilds never silently drop fields.
1010 The returned node is downcast to the registered subclass for ``op``.
1011
1012 Parameters
1013 ----------
1014 **changes : Any
1015 Field overrides; any of ``op``, ``args``, ``workspace``, ``config``,
1016 ``dispatch``, ``scope``.
1017
1018 Returns
1019 -------
1020 new_call : TilePrimitiveCall
1021 A new call with the requested fields replaced.
1022 """
1023 unknown = set(changes) - {"op", "args", "workspace", "config", "dispatch", "scope"}
1024 if unknown:
1025 raise TypeError(f"Unknown field(s) for TilePrimitiveCall.replace: {sorted(unknown)}")
1026 new_call = TilePrimitiveCall(
1027 *changes.get("args", self.args),
1028 op=changes.get("op", self.op),
1029 workspace=changes.get("workspace", self.workspace),
1030 config=changes.get("config", self.config),
1031 dispatch=changes.get("dispatch", self.dispatch),
1032 scope=changes.get("scope", self.scope),
1033 )
1034 return TilePrimitiveCall.downcast(new_call)
1035
1036 def with_workspace(self, workspace: dict[str, Buffer]) -> "TilePrimitiveCall":
1037 """Return a copy with ``workspace`` replaced, preserving all other fields."""

Callers 15

with_workspaceMethod · 0.95
loadLibraryMethod · 0.45
permute_dimsFunction · 0.45
parse_shape_nameFunction · 0.45
get_converterMethod · 0.45
_sanitize_nameMethod · 0.45
_safeFunction · 0.45
_ldmatrix_partsFunction · 0.45
_stmatrix_partsFunction · 0.45
_ptx_ld_helper_nameFunction · 0.45
_ptx_ld_partsFunction · 0.45

Calls 3

TilePrimitiveCallClass · 0.85
downcastMethod · 0.80
getMethod · 0.45