MLIR 22.0.0git
mlir::scf::PipeliningOption Struct Reference

Options to dictate how loops should be pipelined. More...

#include "mlir/Dialect/SCF/Transforms/Transforms.h"

Public Types

enum class  PipelinerPart { Prologue , Kernel , Epilogue }
using GetScheduleFnType
 Lambda returning all the operation in the forOp, with their stage, in the order picked for the pipelined loop.
using AnnotationlFnType
 Lambda called by the pipeliner to allow the user to annotate the IR while it is generated.
using PredicateOpFn

Public Attributes

GetScheduleFnType getScheduleFn = nullptr
AnnotationlFnType annotateFn = nullptr
bool peelEpilogue = true
 Control whether the epilogue should be peeled out of the loop or operations should be predicated to skip the early stages in the last loop iterations.
bool supportDynamicLoops = false
 Control whether the transformation checks that the number of iterations is greater or equal to the number of stages and skip the transformation if this is not the case.
PredicateOpFn predicateFn = nullptr

Detailed Description

Options to dictate how loops should be pipelined.

Definition at line 129 of file Transforms.h.

Member Typedef Documentation

◆ AnnotationlFnType

Initial value:
std::function<void(Operation *, PipelinerPart, unsigned)>
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88

Lambda called by the pipeliner to allow the user to annotate the IR while it is generated.

The callback passes the operation created along with the part of the pipeline and the iteration index. The iteration index is always 0 for the kernel. For the prologue and epilogue, it corresponds to the iteration peeled out of the loop in the range [0, maxStage].

Definition at line 146 of file Transforms.h.

◆ GetScheduleFnType

Initial value:
std::function<void(
scf::ForOp, std::vector<std::pair<Operation *, unsigned>> &)>

Lambda returning all the operation in the forOp, with their stage, in the order picked for the pipelined loop.

Definition at line 132 of file Transforms.h.

◆ PredicateOpFn

Initial value:
std::function<Operation *(RewriterBase &, Operation *, Value)>
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96

Definition at line 169 of file Transforms.h.

Member Enumeration Documentation

◆ PipelinerPart

Enumerator
Prologue 
Kernel 
Epilogue 

Definition at line 135 of file Transforms.h.

Member Data Documentation

◆ annotateFn

AnnotationlFnType mlir::scf::PipeliningOption::annotateFn = nullptr

Definition at line 148 of file Transforms.h.

◆ getScheduleFn

GetScheduleFnType mlir::scf::PipeliningOption::getScheduleFn = nullptr

Definition at line 134 of file Transforms.h.

◆ peelEpilogue

bool mlir::scf::PipeliningOption::peelEpilogue = true

Control whether the epilogue should be peeled out of the loop or operations should be predicated to skip the early stages in the last loop iterations.

If the epilogue is predicated; the user needs to provide a lambda to generate the predicated version of operations.

Definition at line 154 of file Transforms.h.

◆ predicateFn

PredicateOpFn mlir::scf::PipeliningOption::predicateFn = nullptr

Definition at line 171 of file Transforms.h.

◆ supportDynamicLoops

bool mlir::scf::PipeliningOption::supportDynamicLoops = false

Control whether the transformation checks that the number of iterations is greater or equal to the number of stages and skip the transformation if this is not the case.

If the loop is dynamic and this is set to true and the loop bounds are not static the pipeliner will have to predicate operations in the the prologue/epilogue.

Definition at line 161 of file Transforms.h.


The documentation for this struct was generated from the following file: