[Mlir-commits] [mlir] Sub-channel quantized type implementation (PR #120172)

Kevin Gleason llvmlistbot at llvm.org
Tue Feb 11 14:55:22 PST 2025


================
@@ -175,7 +267,16 @@ LogicalResult StorageCastOp::verify() {
   // Verify integrity of per-axis quantization information, if available. While
   // the quantization type may appear in the input or the result, their tensor
   // shapes are guaranteed to be identical at this point.
-  return verifyPerAxisQuantization(*this, quantizedType, getInput().getType());
+  if (auto quantizedPerAxisType =
+          dyn_cast<UniformQuantizedPerAxisType>(quantizedType))
+    return verifyPerAxisQuantization(*this, quantizedPerAxisType,
+                                     getInput().getType());
+  else if (auto quantizedSunChannelType =
----------------
GleasonK wrote:

Given that the previous if returns, use another `if` here instead of `else if`: https://releases.llvm.org/10.0.0/docs/CodingStandards.html#don-t-use-else-after-a-return

https://github.com/llvm/llvm-project/pull/120172


More information about the Mlir-commits mailing list