MLIR
20.0.0git
|
A version of ValueBoundsConstraintSet
that can solve for scalable bounds.
More...
#include "mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h"
Classes | |
struct | ConstantOrScalableBound |
A thin wrapper over an AffineMap which can represent a constant bound, or a scalable bound (in terms of vscale). More... | |
Public Member Functions | |
ScalableValueBoundsConstraintSet (MLIRContext *context, ValueBoundsConstraintSet::StopConditionFn stopCondition, unsigned vscaleMin, unsigned vscaleMax) | |
Value | getVscaleValue () const |
Get the value of vscale. Returns nullptr vscale as not been encountered. More... | |
void | setVscale (vector::VectorScaleOp vscaleOp) |
Sets the value of vscale. Asserts if vscale has already been set. More... | |
unsigned | getVscaleMin () const |
The minimum possible value of vscale. More... | |
unsigned | getVscaleMax () const |
The maximum possible value of vscale. More... | |
Static Public Member Functions | |
static FailureOr< ConstantOrScalableBound > | computeScalableBound (Value value, std::optional< int64_t > dim, unsigned vscaleMin, unsigned vscaleMax, presburger::BoundType boundType, bool closedUB=true, StopConditionFn stopCondition=nullptr) |
Computes a (possibly) scalable bound for a given value. More... | |
Static Public Attributes | |
static char | ID = 0 |
A version of ValueBoundsConstraintSet
that can solve for scalable bounds.
Definition at line 29 of file ScalableValueBoundsConstraintSet.h.
|
inline |
Definition at line 32 of file ScalableValueBoundsConstraintSet.h.
|
static |
Computes a (possibly) scalable bound for a given value.
This is similar to ValueBoundsConstraintSet::computeConstantBound()
, but uses knowledge of the range of vscale to compute either a constant bound, an expression in terms of vscale, or failure if no bound can be computed.
The resulting AffineMap
will always take at most one parameter, vscale, and return a single result, which is the bound of value
.
Note: vscaleMin
must be <=
to vscaleMax
. If vscaleMin
== vscaleMax
, the resulting bound (if found), will be constant.
Definition at line 44 of file ScalableValueBoundsConstraintSet.cpp.
References mlir::Value::getContext(), getVscaleValue(), and mlir::ValueBoundsConstraintSet::kIndexValue.
|
inline |
The maximum possible value of vscale.
Definition at line 90 of file ScalableValueBoundsConstraintSet.h.
|
inline |
The minimum possible value of vscale.
Definition at line 87 of file ScalableValueBoundsConstraintSet.h.
|
inline |
Get the value of vscale. Returns nullptr
vscale as not been encountered.
Definition at line 78 of file ScalableValueBoundsConstraintSet.h.
Referenced by computeScalableBound().
|
inline |
Sets the value of vscale. Asserts if vscale has already been set.
Definition at line 81 of file ScalableValueBoundsConstraintSet.h.
|
static |
Definition at line 92 of file ScalableValueBoundsConstraintSet.h.