Collection of general Ivy compilation functions.
- ivy.compile(func, /, *, dynamic=True, example_inputs=None, static_argnums=None, static_argnames=None)
Provide a function which should be compiled, for faster inference. The handle to the newly compiled function is returned.
Callable) – Function to be compiled.
bool) – Whether to compile all conditional branches, regardless of inputs during first (default:
Any]]]) – Example of inputs to the function to be compiled. (default:
None) Required for torch in non-dynamic mode, unused by other frameworks.
int]]]) – The argument numbers which should be treated as static for compiling. Default is (default:
str]]]) – The argument names which should be treated as static for compiling. Default is (default:
- Return type
ret – The handle to the newly compiled function.
This should have hopefully given you an overview of the compilation submodule,If you have any questions, please feel free to reach out on our discord in the compilation channel or in the compilation forum!