torch.fx.passes.infra.pass_manager.pass_result_wrapper#
- torch.fx.passes.infra.pass_manager.pass_result_wrapper(fn)[source]#
Wrapper for passes which currently do not return a PassResult. This wrapper makes them return a PassResult containing the modified object and True for the “modified” flag.
- Parameters:
fn (Callable[Module, Any]) –
- Returns:
wrapped_fn (Callable[Module, PassResult])
- Return type:
Callable[[…], PassResult | None]
Warning
This API is experimental and is NOT backward-compatible.