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
Merge request reports
Activity
changed milestone to %Release 2.0
requested review from @ob28imeq
assigned to @da15siwa
added 1 commit
- 1da88378 - use older (numpy < 2.0) variant of C-API array import
added 1 commit
- f4c3c78e - Set compiler info target correctly in test suite
added 1 commit
- 452e4716 - Use PyArray_DATA to get numpy array data pointer
- Resolved by Christoph Alt
- Resolved by Christoph Alt
mentioned in commit 0247f900
mentioned in merge request !471 (merged)