[all-commits] [llvm/llvm-project] 9dd762: [mlir][python] allow DenseIntElementsAttr for inde...

Matthias Gehre via All-commits all-commits at lists.llvm.org
Tue Jan 28 09:32:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dd762e8b10586e749b0ddf3542e5dccf8392395
      https://github.com/llvm/llvm-project/commit/9dd762e8b10586e749b0ddf3542e5dccf8392395
  Author: Matthias Gehre <matthias.gehre at amd.com>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M mlir/include/mlir-c/BuiltinAttributes.h
    M mlir/lib/Bindings/Python/IRAttributes.cpp
    M mlir/lib/CAPI/IR/BuiltinAttributes.cpp
    M mlir/test/python/dialects/builtin.py
    M mlir/test/python/ir/array_attributes.py
    M mlir/test/python/ir/attributes.py

  Log Message:
  -----------
  [mlir][python] allow DenseIntElementsAttr for index type (#118947)

Model the `IndexType` as `uint64_t` when converting to a python integer. 

With the python bindings, 
```python
DenseIntElementsAttr(op.attributes["attr"])
```
used to `assert` when `attr` had `index` type like `dense<[1, 2, 3, 4]>
: vector<4xindex>`.

---------

Co-authored-by: Christopher McGirr <christopher.mcgirr at amd.com>
Co-authored-by: Tiago Trevisan Jost <tiago.trevisanjost at amd.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list