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)
| 1265 | |
| 1266 | |
| 1267 | def 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 | |
| 1286 | def DecomposeOpsForTraining(func_name: str | None = None) -> tvm.ir.transform.Pass: |
no outgoing calls
no test coverage detected
searching dependent graphs…