|
My Project
|
#include <UniformConstraints.h>
Public Member Functions | |
| UniformConstraintsBuilder (CAGSlice &slice) | |
| void | coupleAnchors (CAGAnchorNode *a, CAGAnchorNode *b) |
| void | applyStats (CAGAnchorNode *a, TensorAxisStatistics stats) |
| void | clamp (CAGAnchorNode *a, APFloat minValue, APFloat maxValue) |
| void | propagateExplicitScale (CAGAnchorNode *from, CAGAnchorNode *to) |
Factory methods for adding CAG constraints of various kinds suitable for solving for uniform quantization.
|
inline |
| void UniformConstraintsBuilder::applyStats | ( | CAGAnchorNode * | a, |
| TensorAxisStatistics | stats | ||
| ) |
Applies statistics constraints to the given anchor, such that the solver ensures that the statistics are representable by chosen types.
| void UniformConstraintsBuilder::clamp | ( | CAGAnchorNode * | a, |
| APFloat | minValue, | ||
| APFloat | maxValue | ||
| ) |
Applies a constraint to a node which allows solutions that do not extend beyond given min/max bounds (this is a hint that the tensor will not take values outside of these bounds). If either minValue or maxValue is NAN, then that side is considered open.
| void UniformConstraintsBuilder::coupleAnchors | ( | CAGAnchorNode * | a, |
| CAGAnchorNode * | b | ||
| ) |
Adds a coupling constraint between two nodes, effectively treating them as a hard identity relationship.
| void UniformConstraintsBuilder::propagateExplicitScale | ( | CAGAnchorNode * | from, |
| CAGAnchorNode * | to | ||
| ) |
Propagates an explicit scale from an anchor that may have a uniform |selectedType| to the |explicitScaleZeroPoint| field of the to node. This is typically used with a to node that has a candidate quantized type of |UniformExplicitFixedPointScale|, indicating that it can be an arbitrary (signed) type that is expected to share the same scale as the originating node.
1.8.13