forked from OSchip/llvm-project
Fix typo in QuantizedType method names
Closes tensorflow/mlir#172 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/172 from kiszk:quantops e27b57eac8f4c6ef7ee6a6f7b497d3e2f56f6798 PiperOrigin-RevId: 273879164
This commit is contained in:
parent
221e661e91
commit
f5813ff8e1
|
@ -88,7 +88,7 @@ public:
|
|||
|
||||
/// Gets the minimum possible stored by a storageType. storageTypeMin must
|
||||
/// be greater than or equal to this value.
|
||||
static int64_t getDefaultMininumForInteger(bool isSigned,
|
||||
static int64_t getDefaultMinimumForInteger(bool isSigned,
|
||||
unsigned integralWidth) {
|
||||
if (isSigned) {
|
||||
return llvm::minIntN(integralWidth);
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
/// Gets the maximum possible stored by a storageType. storageTypeMax must
|
||||
/// be less than or equal to this value.
|
||||
static int64_t getDefaultMaxinumForInteger(bool isSigned,
|
||||
static int64_t getDefaultMaximumForInteger(bool isSigned,
|
||||
unsigned integralWidth) {
|
||||
if (isSigned) {
|
||||
return llvm::maxIntN(integralWidth);
|
||||
|
|
|
@ -60,9 +60,9 @@ LogicalResult QuantizedType::verifyConstructionInvariants(
|
|||
bool isSigned =
|
||||
(flags & QuantizationFlags::Signed) == QuantizationFlags::Signed;
|
||||
int64_t defaultIntegerMin =
|
||||
getDefaultMininumForInteger(isSigned, integralWidth);
|
||||
getDefaultMinimumForInteger(isSigned, integralWidth);
|
||||
int64_t defaultIntegerMax =
|
||||
getDefaultMaxinumForInteger(isSigned, integralWidth);
|
||||
getDefaultMaximumForInteger(isSigned, integralWidth);
|
||||
if (storageTypeMax - storageTypeMin <= 0 ||
|
||||
storageTypeMin < defaultIntegerMin ||
|
||||
storageTypeMax > defaultIntegerMax) {
|
||||
|
|
|
@ -519,9 +519,9 @@ bool TypeParser::parseStorageRange(IntegerType storageType, bool isSigned,
|
|||
int64_t &storageTypeMin,
|
||||
int64_t &storageTypeMax) {
|
||||
|
||||
int64_t defaultIntegerMin = QuantizedType::getDefaultMininumForInteger(
|
||||
int64_t defaultIntegerMin = QuantizedType::getDefaultMinimumForInteger(
|
||||
isSigned, storageType.getWidth());
|
||||
int64_t defaultIntegerMax = QuantizedType::getDefaultMaxinumForInteger(
|
||||
int64_t defaultIntegerMax = QuantizedType::getDefaultMaximumForInteger(
|
||||
isSigned, storageType.getWidth());
|
||||
if (consumeIf(TokenKind::l_angle)) {
|
||||
// Explicit storage min and storage max.
|
||||
|
@ -639,9 +639,9 @@ static void printStorageType(QuantizedType type, raw_ostream &out) {
|
|||
|
||||
// storageTypeMin and storageTypeMax if not default.
|
||||
int64_t defaultIntegerMin =
|
||||
QuantizedType::getDefaultMininumForInteger(isSigned, storageWidth);
|
||||
QuantizedType::getDefaultMinimumForInteger(isSigned, storageWidth);
|
||||
int64_t defaultIntegerMax =
|
||||
QuantizedType::getDefaultMaxinumForInteger(isSigned, storageWidth);
|
||||
QuantizedType::getDefaultMaximumForInteger(isSigned, storageWidth);
|
||||
if (defaultIntegerMin != type.getStorageTypeMin() ||
|
||||
defaultIntegerMax != type.getStorageTypeMax()) {
|
||||
out << "<" << type.getStorageTypeMin() << ":" << type.getStorageTypeMax()
|
||||
|
|
Loading…
Reference in New Issue