File iter_affine_map.h#
↰ Parent directory (tvm/sym)
Iterator quasi-affine mapping patterns.
Definition (tvm/sym/iter_affine_map.h)#
Detailed Description#
This file defines a collection of mapping patterns maps a collection of independent iterators to another collection of independent iterators.
There are two main kinds of mapping patterns:
Fuse: fuse a collection of iterators into a single one
domain(x0) = [0, 4), domain(x1) = [0, 3), domain(x2) = [0, 2) fuse(x0, x1, x2): y = x2 * 12 + x1 * 4 + x0 domain(y) = [0, 24)
Split: split an iterator into multiple ones
domain(x) = [0, 24) split(x, 3, 12): [y0, y1, y2] = [x % 3, (x % 12) / 3, x / 12] domain(y0) = [0, 3), domain(y1) = [0, 4), domain(y2) = [0, 2)
We use the name “(quasi)affine” to be consistent with the terminology used in the polyhedral compilation. Notably, fuse is an affine transformation, while split corresponds to additional floordiv/mod operations that can appear in quasi-affine transformations.
Includes#
tvm/ffi/reflection/registry.htvm/ir/cow.h(File cow.h)tvm/ir/expr.h(File expr.h)tvm/sym/analyzer.h(File analyzer.h)