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

Function DecomposeOpsForTraining

python/tvm/relax/transform/transform.py:1286–1302  ·  view source on GitHub ↗

Decompose composite operators that are composed by other operators during training. 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 ---------- f

(func_name: str | None = None)

Source from the content-addressed store, hash-verified

1284
1285
1286def DecomposeOpsForTraining(func_name: str | None = None) -> tvm.ir.transform.Pass:
1287 """Decompose composite operators that are composed by other operators during training.
1288 For example, the result of batch norm (a triple) will be simplified. Attention, tensor_to_shape,
1289 etc. can be also decomposed into a number of simplified operators as well.
1290
1291 Parameters
1292 ----------
1293 func_name: Optional[str]
1294 The name of the specified function. If not specified, the pass will run in
1295 all functions.
1296
1297 Returns
1298 -------
1299 ret : tvm.transform.Pass
1300 The registered pass
1301 """
1302 return _ffi_api.DecomposeOpsForTraining(func_name) # type: ignore
1303
1304
1305def AlterOpImpl(

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…