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.