Docs / nablatensor-core / com.nablatensor.engine
final class
JitOptimizations
Opt-in code-generation optimizations for the cpu-jit AAD engine.
The default is NONE: the generated kernel is a straight-line transcription of the recorded tape that calls java.lang.Math for every transcendental, so its output matches the scalar cpu interpreter bit for bit. Every optimization below is enabled explicitly, either by picking a level or by naming individual categories.
Nabla.model(base, this::asian)
.greeks().fp64().threads(8).on("cpu-jit")
.jit(JitOptimizations.Level.LOW_RISK) // level form
.build();
Nabla.model(base, this::asian)
.greeks().fp64().threads(8).on("cpu-jit")
.jit(JitOptimizations.Category.ROLLED_LOOPS, // category form
JitOptimizations.Category.DRAW_CACHE)
.build();
The system properties -Dnablatensor.jit.roll and -Dnablatensor.crn still override this setting when present, so existing benchmark scripts are unaffected; the fluent value is what applies when they are absent.
Methods
The default: no optimizations.
The optimizations bundled under level.
Exactly the named categories, and nothing else.
This set plus category.
Whether category is enabled.
The enabled categories, unmodifiable.