torch.compiler API reference¶
For a quick overview of torch.compiler, see torch.compiler.
| compile | See  | 
| reset | This function clears all compilation caches and restores the system to its initial state. | 
| allow_in_graph | Tells the compiler frontend (Dynamo) to skip symbolic introspection of the function and instead directly write it to the graph when encountered. | 
| substitute_in_graph | Register a polyfill handler for a function, usually a C function from the C extension, to be used in place of the original function when inlining the original function in the graph. | 
| assume_constant_result | This function is used to mark a function fn as having a constant result. | 
| list_backends | Return valid strings that can be passed to torch.compile(..., backend="name"). | 
| disable | This function provides a decorator to disable compilation on a function It also provides the option of recursively disabling called functions | 
| set_stance | Set the current stance of the compiler. | 
| cudagraph_mark_step_begin | Indicates that a new iteration of inference or training is about to begin. | 
| is_compiling | Indicates whether a graph is executed/traced as part of torch.compile() or torch.export(). | 
| is_dynamo_compiling | Indicates whether a graph is traced via TorchDynamo. |