Module Tolk.Opt
Kernel optimisations.
An optimisation reshapes the loops of a kernel. It names the axis it acts on by its position among the kernel's axes.
The type for the roles a split gives the axis it makes, in the order of their axis types (Ops.Axis_type.compare): an axis across the threads of a workgroup, or an axis unrolled into the lanes of a thread, which a reduction's axis unrolls as its loop.
type t = - #
| Tc of {}(*Use a tensor core on the reduction at
*)axis:tc_selectpicks the core (-1the first that fits),tc_opthow far to relax its requirements, from 0 to 2, anduse_tchow to use it, 1 or 2.tc_optcarries the level ofSetting.tc_opt, or the search's2, anduse_tcthat ofSetting.use_tc. - #
| Split of {}(*Split
*)amountout ofaxisinto a new axis fortarget, taken from the outer end iftop. Anamountof0takes the whole axis. - #
| Padto of {}(*Pad
*)axisto a multiple ofamount. - #
| Swap of {}(*Swap two global axes.
*)
The type for kernel optimisations.