- unregister-crunch-codegen-backend!procedure
Remove the registered backend.
The code generator runs:
- element-wise maps, with one or several outputs, over spaces of up to rank 6, whose operands are read through identities, broadcasts, transposes and other strided views;
- reductions over spaces of up to rank 8 that combine with add, mul, max or min, with the map fused into them and the final step fused after them;
- matrix products with an epilogue: the BLAS backend computes the product, and the epilogue runs as a generated kernel;
- scans over spaces of up to rank 8 that the catalogue scan kernels do not run: scans with a combining expression or aux arrays, scans of strided arrays, and integer scans.
The operands may be f32, f64, s32, s64 or u32. A body may contain (if (rel x y) a b), with rel one of <, >, <=, >= and =; the kernel computes both branches and picks one.
Results. A generated kernel computes the same values as the Scheme code it replaces, bit for bit: it rounds where the body says so, adds in the same order, and follows Scheme's arithmetic on mixed integers and floats. When an integer result would leave the range of its dtype, the kernel stops and the segop runs on the host for that call.
When kernels are compiled. The kernels of a plan are compiled together, as one module, when the plan is compiled, at the second step of a program run through ssa-realize/ctx. Compiled modules are kept in a cache directory, so later processes load them instead of compiling them again. If a module cannot be compiled, its segops run on the backends after the code generator, and a warning is written.