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

Function DecomposeOpsForInference

python/tvm/relax/transform/transform.py:1267–1283  ·  view source on GitHub ↗

Decompose composite operators that are composed by other operators during inference. For example, the result of batch norm (a triple) will be simplified. Attention, tensor_to_shape, etc. can be also decomposed into a number of simplified operators as well. Parameters ----------

(func_name: str | None = None)

Source from the content-addressed store, hash-verified

1265
1266
1267def DecomposeOpsForInference(func_name: str | None = None) -> tvm.ir.transform.Pass:
1268 """Decompose composite operators that are composed by other operators during inference.
1269 For example, the result of batch norm (a triple) will be simplified. Attention, tensor_to_shape,
1270 etc. can be also decomposed into a number of simplified operators as well.
1271
1272 Parameters
1273 ----------
1274 func_name: Optional[str]
1275 The name of the specified function. If not specified, the pass will run in
1276 all functions.
1277
1278 Returns
1279 -------
1280 ret : tvm.transform.Pass
1281 The registered pass
1282 """
1283 return _ffi_api.DecomposeOpsForInference(func_name) # type: ignore
1284
1285
1286def DecomposeOpsForTraining(func_name: str | None = None) -> tvm.ir.transform.Pass:

Callers 1

transform_moduleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…