[Mlir-commits] [mlir] [MLIR][Linalg] More Linalg named ops (PR #90236)

Renato Golin llvmlistbot at llvm.org
Fri Apr 26 15:19:27 PDT 2024


================
@@ -115,12 +115,16 @@ class Builder {
   ArrayAttr getArrayAttr(ArrayRef<Attribute> value);
 
   // Returns a 0-valued attribute of the given `type`. This function only
-  // supports boolean, integer, and 16-/32-/64-bit float types, and vector or
+  // supports integer, and 16-/32-/64-bit float types, and vector or
   // ranked tensor of them. Returns null attribute otherwise.
   TypedAttr getZeroAttr(Type type);
   // Returns a 1-valued attribute of the given `type`.
   // Type constraints are the same as `getZeroAttr`.
   TypedAttr getOneAttr(Type type);
+  // Returns a numeric attribute of the given `type`.
+  // Type constraints are the same as `getZeroAttr`.
+  // Non float types are converted before returning the attribute.
+  TypedAttr getNumberAttr(double value, Type type);
----------------
rengolin wrote:

Honestly, with the x*x we don't need the 2.0. I'll revert this part of the change and we can discuss that later.

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


More information about the Mlir-commits mailing list