Module Renderer.Estimates
Cost estimates of kernels.
type t = Ops.estimatesThe type for estimates.
add e0 e1 is the estimate of both e0's and e1's work: each count is the sum of theirs, exactly: an Int where it fits one, else a constant node.
simplify e is e with each count simplified (Shape.ssimplify).
of_uops ~ignore_indexing uops estimates the linearized kernel uops:
opscounts arithmetic and logic operations, a multiply-add as two, and a tensor core product as2 N M Kshared among the threads of its warp;ldscounts the bytes of each load and store, except those of registers;memcounts, for each parameter, the bytes loaded from it and the bytes stored into it, each at most the parameter's size: a buffer read again is counted once.
Each operation counts once per iteration of the ranges and hardware indices around it. A range with no trip count, a loop, counts as one iteration, a trip count that depends on a hardware index is taken at index 0, and one that depends on another range, as a triangular loop's does, or on a value loaded from memory, at its greatest value: a count reads no value but the run's variables. ops and each parameter's part of mem are simplified; lds is not. With ignore_indexing (default false), the operations that compute the indices of Op.t.Index and Op.t.Shrink nodes, up to the Op.t.End or Op.t.Backedge of any loop they read, are not counted.
The counts are exact: an integer count that does not fit an int, as of a loop bounded by a value loaded from memory, is a node of constants, which ops and mem simplify to one.
Raises Invalid_argument if an Op.t.End or Op.t.Backedge closes no Op.t.Range, or if an Op.t.Wmma node has no tensor core argument.