This document is relevant for: Trn2, Trn3
nki.compiler.OptLevel#
- class nki.compiler.OptLevel(value)[source]#
How many optimizations the compiler applies in the new flow (
CompileConfig.opt_level).O0: a predictable baseline. Each instruction that can run on more than one engine and has noengine=runs on its default engine, alsonisa.tensor_copy.O1(default): the compiler chooses the engine of eachnisa.tensor_copythat has noengine=. Other instructions that have noengine=run on their default engine, unlessengine_balancingis on.O2:O1, plus the optimizations that the flow can turn on, for exampleprefetch_auto,dma_copy_elimandelement_widening.
The current flow is the same at every level. See Optimization levels.
Attributes
O0O1O2
This document is relevant for: Trn2, Trn3