forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][python] allow DenseIntElementsAttr for index type
Model the IndexType as size_t when converting to a python integer. This should follow the definition of the IndexType as system-dependent. This solves the following issue when for example an attribute is defined as: ``` denseattr = dense<[1, 2, 3, 4]> : vector<4xindex> ``` which is a valid DenseElementsAttr. The change will fix an access issue when reading the attribute in python. E.g. ``` DenseIntElementsAttr(op.attributes["denseattr"]) ``` Co-authored-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com> Co-authored-by: Matthias Gehre <matthias.gehre@amd.com>
- Loading branch information
1 parent
7ed5dd2
commit 37e4ced
Showing
6 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters