Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit and optional attributes #35

Closed
Dinistro opened this issue Jan 4, 2022 · 2 comments
Closed

Unit and optional attributes #35

Dinistro opened this issue Jan 4, 2022 · 2 comments

Comments

@Dinistro
Copy link
Collaborator

Dinistro commented Jan 4, 2022

For some operations/types it would be nice to have optional attributes or unit attributes/parameters.

For example, MLIR's memref.global has a unit attribute constant which, when present, indicates that this global is constant.
Another one are IntegerTypes, which can have a "signedness" parameter which indicates that the type is a signed integer.

One could also add boolean attributes but this might clutter the output a lot.

@Dinistro
Copy link
Collaborator Author

Optional attributes are done, but support for unit attributes will still be helpful.
In devito, they add a lot of meta information to operations, like affine, parallel, skewable, etc. to indicate certain properties of a operation. Currently, these properties are added to a properties ArrayAttr which contains StringAttr's. While this works, it is very cumbersome to use.

@Dinistro
Copy link
Collaborator Author

Fixed by #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant