[Mlir-commits] [mlir] [mlir] support scalable vectors in python bindings (PR #71050)
Maksim Levental
llvmlistbot at llvm.org
Thu Nov 2 08:57:42 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:
Okay that reminds me to upstream https://github.com/makslevental/mlir-python-utils/blob/main/mlir/utils/types.py.
https://github.com/llvm/llvm-project/pull/71050
More information about the Mlir-commits
mailing list