Module Tolk.Gpu_dim
Canonical GPU workitem dimensions.
Tinygrad represents GPU workitem ids in the UOp graph as raw Tolk_uop.Ops.t.Special names: gidxN for group ids, lidxN for local ids, and idxN for flat global ids. This module is the typed view used by codegen and renderers at the edges where those names have GPU launch meaning.
val axis : t -> intaxis dim is the axis carried by dim.
val to_special_name : t -> stringto_special_name dim is the raw Tolk_uop.Ops.t.Special name for dim.
val of_special_name : string -> t optionof_special_name name decodes a canonical GPU SPECIAL name.
compare orders group ids before local ids before flat global ids, then by axis.
compare_special_name a b orders canonical names with compare. Unknown names sort after canonical names and are then ordered lexicographically.