ahead-of-time lowering and compilation
See original GitHub issueFollowing the experiment in #6034, plus other thoughts and motivation accrued since, we should support a notion of lowering and compilation “ahead of time,” i.e. upon explicit request. Some things to note:
- Lowering means producing XLA HLO. Compiling means running it through the XLA compiler
- Compiling produces optimized HLO and renders a computation ready for execution.
- Lowering and compilation happen for a fixed type signature.
- A function compiled ahead of time and can be called with arguments of the fixed type signature only.
- A function compiled ahead of time will intentionally fail to transform, e.g. if called under
jvp
orvmap
, since it will be compiled for a particular type signature, and transformations modify signatures. - We will want this for every compiling transformation:
jit
,pjit
,pmap
,xmap
. - Although a function compiled ahead of time is bound to correspond to some XLA executable, it’s out of scope to provide supported access to, or any serialization of, that executable.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Ahead-of-time lowering and compilation - JAX documentation
Ahead-of-time lowering and compilation #. JAX offers several transformations, such as jax.jit and jax.pmap , returning a function that is compiled and runs ......
Read more >Compiling code ahead of time - Numba
Compiling code ahead of time¶. While Numba's main use case is Just-in-Time compilation, it also provides a facility for Ahead-of-Time compilation (AOT).
Read more >Ahead-of-time compilation - Wikipedia
In computer science, ahead-of-time compilation (AOT compilation) is the act of compiling an (often) higher-level programming language into an (often) ...
Read more >So does Julia compile or interpret? - Performance
The core devs like to call Julia a “Just ahead of time” compiler. ... such as parsing and lowering because they are not...
Read more >How does Ahead-of-Time (AOT) compilation work? - Quora
"Ahead of time" compilation is normal compilation. It means that you do all your optimization and code generation before running the program.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
With documentation now in place (#12204) and plenty of usage already, it’s time to declare this complete! We will return with any thoughts and work on cross-AOT when the time comes for that.
The API and implementation are essentially in place, and already in use. I’m working on documentation.