question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ahead-of-time lowering and compilation

See original GitHub issue

Following 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 or vmap, 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:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
froystigcommented, Sep 2, 2022

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.

0reactions
froystigcommented, Aug 5, 2022

The API and implementation are essentially in place, and already in use. I’m working on documentation.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found