Skip to content
Snippets Groups Projects

Rework CPU JIT Extension Module Builder

Merged Frederik Hennig requested to merge fhennig/cpu-jit into v2.0-dev
All threads resolved!

Closes #120 (closed), #122 (closed).

Introduce a new, from-scratch implementation of the CPU JIT extension module builder. Builds on the API and architecture established in !445 (merged).

The new module builder mostly replicates the pybind11-based implementation from !445 (merged), but using fully customized glue code to interact with the Python and NumPy runtime APIs. While this takes more code, it leads to much faster compile times since the backend compiler does not need to decipher the heavy templates of pybind11. Also, we have more control about parameter type checking and conversion.

CPU JIT

  • Introduce a new DefaultExtensionModuleBuilder and associated module template
  • Remove the pybind11-based module builder prototype
  • Remove LegacyCpuJIT
  • Streamline CpuJit and CompilerInfo APIs
  • Add preliminary support for apple-clang as a backend compiler

Behaviour Changes

  • JIT-compiled kernels will now check all fixed shape and stride components of their fields upon invocation
  • Index shape of buffer fields will now be checked at kernel invocation

Documentation

  • Adapt documentation about CPU JIT

Testing and CI

  • Change the gen_config fixture to set up the CPU JIT such that a unique temporary directory is used for JIT object caching during each test session
  • Set the JIT compiler info in the gen_config fixture according to the code generation target (for #122 (closed))
  • Remove the experimental CPU JIT test mode and CI task
Edited by Frederik Hennig

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 5074ad1c - fix random init in JIT tests

    Compare with previous version

  • Christoph Alt resolved all threads

    resolved all threads

  • Christoph Alt approved this merge request

    approved this merge request

  • Christoph Alt mentioned in commit 0247f900

    mentioned in commit 0247f900

  • merged

  • Frederik Hennig mentioned in merge request !471 (merged)

    mentioned in merge request !471 (merged)

  • Please register or sign in to reply
    Loading