File tree 2 files changed +1
-5
lines changed
2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,6 @@ LogicalResult UniformQuantizedType::verifyInvariants(
322
322
// Verify scale.
323
323
double minScale = getMinScale (expressedType);
324
324
double maxScale = getMaxScale (expressedType);
325
- if (scale <= 0.0 || std::isinf (scale) || std::isnan (scale))
326
- return emitError () << " illegal scale: " << scale;
327
325
if (scale < minScale || scale > maxScale)
328
326
return emitError () << " scale out of expressed type range [" << minScale
329
327
<< " , " << maxScale << " ]" ;
@@ -388,8 +386,6 @@ LogicalResult UniformQuantizedPerAxisType::verifyInvariants(
388
386
double minScale = getMinScale (expressedType);
389
387
double maxScale = getMaxScale (expressedType);
390
388
for (double scale : scales) {
391
- if (scale <= 0.0 || std::isinf (scale) || std::isnan (scale))
392
- return emitError () << " illegal scale: " << scale;
393
389
if (scale < minScale || scale > maxScale)
394
390
return emitError () << " scale out of expressed type range [" << minScale
395
391
<< " , " << maxScale << " ]" ;
Original file line number Diff line number Diff line change 107
107
108
108
// -----
109
109
// Illegal scale: negative
110
- // expected-error@+1 {{illegal scale: -1.000000 }}
110
+ // expected-error@+1 {{scale out of expressed type range }}
111
111
!qalias = !quant.uniform <i8 <-4 :3 >:f32 , -1.0 :127 >
112
112
113
113
// -----
You can’t perform that action at this time.
0 commit comments