[Mlir-commits] [mlir] [mlir][Math] Fix 0-rank support for PolynomialApproximation (PR #114826)

Kunwar Grover llvmlistbot at llvm.org
Mon Nov 4 09:22:41 PST 2024


================
@@ -43,16 +43,16 @@ using namespace mlir::vector;
 struct VectorShape {
   ArrayRef<int64_t> sizes;
   ArrayRef<bool> scalableFlags;
-
-  bool empty() const { return sizes.empty(); }
+  bool scalar = true;
 };
 
 // Returns vector shape if the type is a vector. Returns an empty shape if it is
 // not a vector.
 static VectorShape vectorShape(Type type) {
   auto vectorType = dyn_cast<VectorType>(type);
   return vectorType
-             ? VectorShape{vectorType.getShape(), vectorType.getScalableDims()}
+             ? VectorShape{vectorType.getShape(), vectorType.getScalableDims(),
+                           /*scalar=*/false}
              : VectorShape{};
 }
----------------
Groverkss wrote:

Removed scalar, changed to std::optional.

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


More information about the Mlir-commits mailing list