Llvmlite upgrade cadence

Hi,

My name is Modi and I’m an LLVM developer at Meta. We’re using Numba internally for some of our workloads and wanted to get some info about the philosophy around the llvmlite vs. LLVM upgrade cadence.

For context, we keep a single copy of LLVM within our fleet with the latest in the middle of being upgraded to being 17.x. With llvmlite being on 14.x this is predictably causing compatibility issues.

Currently the two major API churns are the deprecation of legacy pass manager APIs ([PassManagerBuilder] Remove PassManagerBuilder · llvm/llvm-project@d623b2f · GitHub) requiring a migration to the new pass manager and the switch to opaque pointers ([llvmlite] Support opaque pointers. by folded · Pull Request #908 · numba/llvmlite · GitHub, although with the failing CI tests there looks to be more work to be done to get this finalized).

Thanks!
Modi

Hi Modi,

Upgrading LLVM is always a costly task for us given the large amount of platforms Numba/llvmlite supports. LLVM API breaking changes are even more strenuous as we need to synchronize the upgrade for both Numba and llvmlite. In the past months, we have prioritized upgrading to Python 3.12 and, currently, upgrading to NumPy 2.0. Both of these upgrades require significant changes. NumPy 2.0 will even require a type system change. Since the Numba maintainers are a relatively small team (7 people, all with other responsibilities), keeping up with Python and NumPy versions has consumed most of our time and we cannot risk doing multiple major dependency upgrades at the same time.

We’d appreciate any help from experienced LLVM developers to help us upgrade LLVM. If you or anyone can help with the LLVM upgrade, we can talk about the details in our weekly developer meeting/office hours (see meeting details here).

1 Like

Followed up in the weekly maintainers meeting. Posting the typical upgrade workflow here for reference:

  1. Build llvm locally with conda to generate a package
    a. Many platforms: Windows, Linux, Mac. Many archs: x86, arm64, powerpc etc.
  2. C/C++ API patching
    a. Generally pretty okay
    b. Has a custom pruning pass in their downstream LLVM to be carried forward
  3. Generate LLVM lite artifact
  4. Testing numba
    a. Checks that vectorization occurs: Specific codegen requirements
    c. Intel SVML patch: Enables LLVM to use on fp=fast
  5. Long bake time