[Mlir-commits] [mlir] [mlir] support scalable vectors in python bindings (PR #71050)

Maksim Levental llvmlistbot at llvm.org
Thu Nov 2 08:50:32 PDT 2023


================
@@ -300,14 +300,33 @@ def testVectorType():
 
         none = NoneType.get()
         try:
-            vector_invalid = VectorType.get(shape, none)
+            VectorType.get(shape, none)
         except MLIRError as e:
             # CHECK: Invalid type:
             # CHECK: error: unknown: vector elements must be int/index/float type but got 'none'
             print(e)
         else:
             print("Exception not produced")
 
+        scalable_1 = VectorType.get(shape, f32, scalable=[False, True])
+        scalable_2 = VectorType.get([2, 3, 4], f32, scalable=[True, False, True])
----------------
makslevental wrote:

Base 10 is better than base 2 :smiley: i.e., it would be better if the python api just required the user to list the dims that are scalable.

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


More information about the Mlir-commits mailing list