pnnl / COMET

Other
37 stars 7 forks source link

Added a new attribute iterator_type to IndexNode #62

Closed johnpzh closed 5 months ago

johnpzh commented 5 months ago
  1. Added to IndexTreeIndicesOp (Index Tree Dialect) a new attribute iterator_type to tell if the iteration can be parallelized. It is analogous to iterator_types in the linalg.generic op (https://mlir.llvm.org/docs/Dialects/Linalg/#linalggeneric-linalggenericop). Candidate options: parallel, reduction, window, serial, default. This change influences many other code where builder.createindexTree::IndexTreeIndicesOp is called as follows. Some places may need further change to make the logic correct.
    1. lib/Conversion/TensorAlgebraToSCF/LowerPCToLoops.cpp
    2. lib/Conversion/TensorAlgebraToIndexTree/TensorAlgebraToIndexTree.cpp
    3. lib/Dialect/IndexTree/Transforms/Fusion.cpp
    4. lib/Dialect/IndexTree/Transforms/WorkspaceTransforms.cpp
  2. Added a helper class IteratorType as the handle to the new attribute iterator_type and a member in the class TreeNode (include/comet/Dialect/IndexTree/IR/IndexTree.h).
  3. Added a member iteratorTypes in the class Index_Tree to store the iterator type of each iterative index.