File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,6 @@ LogicalResult UniformQuantizedType::verifyInvariants(
322322 // Verify scale.
323323 double minScale = getMinScale (expressedType);
324324 double maxScale = getMaxScale (expressedType);
325- if (scale <= 0.0 || std::isinf (scale) || std::isnan (scale))
326- return emitError () << " illegal scale: " << scale;
327325 if (scale < minScale || scale > maxScale)
328326 return emitError () << " scale out of expressed type range [" << minScale
329327 << " , " << maxScale << " ]" ;
@@ -388,8 +386,6 @@ LogicalResult UniformQuantizedPerAxisType::verifyInvariants(
388386 double minScale = getMinScale (expressedType);
389387 double maxScale = getMaxScale (expressedType);
390388 for (double scale : scales) {
391- if (scale <= 0.0 || std::isinf (scale) || std::isnan (scale))
392- return emitError () << " illegal scale: " << scale;
393389 if (scale < minScale || scale > maxScale)
394390 return emitError () << " scale out of expressed type range [" << minScale
395391 << " , " << maxScale << " ]" ;
Original file line number Diff line number Diff line change 107107
108108// -----
109109// Illegal scale: negative
110- // expected-error@+1 {{illegal scale: -1.000000 }}
110+ // expected-error@+1 {{scale out of expressed type range }}
111111!qalias = !quant.uniform <i8 <-4 :3 >:f32 , -1.0 :127 >
112112
113113// -----
You can’t perform that action at this time.
0 commit comments