My Project
|
#include <UniformKernelUtils.h>
Public Member Functions | |
UniformBinaryOpInfo (Operation *op, Value lhs, Value rhs, Optional< APFloat > clampMin, Optional< APFloat > clampMax) | |
bool | isValid () const |
Returns whether this info is valid (all types defined, etc). More... | |
Type | getQuantizedResultType () const |
Gets the final quantized result type of the result. More... | |
bool | isSameStorageType () const |
Returns whether the storage type of all operands is identical. More... | |
bool | isFixedPointPOT (int &lhsLog2Scale, int &rhsLog2Scale, int &resultLog2Scale) const |
std::pair< IntegerAttr, IntegerAttr > | getClampMinMax (IntegerType ty) const |
Gets the result integer clamp range given the result quantized type. More... | |
Public Attributes | |
Operation * | op |
Value | lhs |
Value | rhs |
Optional< APFloat > | clampMin |
Optional< APFloat > | clampMax |
quant::UniformQuantizedType | lhsType |
quant::UniformQuantizedType | rhsType |
quant::UniformQuantizedType | resultType |
Type | lhsStorageType |
Type | rhsStorageType |
Type | resultStorageType |
Helper class for operating on binary operations where all operands and the result are a UniformQuantizedType.
|
inline |
|
inline |
Gets the result integer clamp range given the result quantized type.
|
inline |
Gets the final quantized result type of the result.
|
inline |
Returns whether all operands and result are considered fixedpoint power of two, setting the lhs, rhs, and result log2 scale references.
|
inline |
Returns whether the storage type of all operands is identical.
|
inline |
Returns whether this info is valid (all types defined, etc).
Optional<APFloat> mlir::fxpmath::detail::UniformBinaryOpInfo::clampMax |
Optional<APFloat> mlir::fxpmath::detail::UniformBinaryOpInfo::clampMin |
Value mlir::fxpmath::detail::UniformBinaryOpInfo::lhs |
Type mlir::fxpmath::detail::UniformBinaryOpInfo::lhsStorageType |
quant::UniformQuantizedType mlir::fxpmath::detail::UniformBinaryOpInfo::lhsType |
Operation* mlir::fxpmath::detail::UniformBinaryOpInfo::op |
Type mlir::fxpmath::detail::UniformBinaryOpInfo::resultStorageType |
quant::UniformQuantizedType mlir::fxpmath::detail::UniformBinaryOpInfo::resultType |
Value mlir::fxpmath::detail::UniformBinaryOpInfo::rhs |
Type mlir::fxpmath::detail::UniformBinaryOpInfo::rhsStorageType |
quant::UniformQuantizedType mlir::fxpmath::detail::UniformBinaryOpInfo::rhsType |