Rework CPU JIT Extension Module Builder
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
andCompilerInfo
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