[mlir][python] Support buffer protocol for splat dense attributes
authorRahul Kayaith <rkayaith@gmail.com>
Wed, 29 Mar 2023 22:49:08 +0000 (18:49 -0400)
committerRahul Kayaith <rkayaith@gmail.com>
Thu, 30 Mar 2023 14:18:03 +0000 (10:18 -0400)
commitf0e847d0a104b45398fd0a981110098bc29250e9
tree4dc913917a33970c31e61d7a10b7492d20ade726
parent32f46ef09f881e8d5ff03f1190673b274aa03ded
[mlir][python] Support buffer protocol for splat dense attributes

These can be made to work by setting the buffer strides to 0.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D147187
mlir/lib/Bindings/Python/IRAttributes.cpp
mlir/test/python/ir/array_attributes.py