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

Feature arith dialect & Vector fix #32

Merged
merged 6 commits into from
Jan 2, 2022
Merged

Conversation

Dinistro
Copy link
Collaborator

This PR splits the std dialect into std and arith. To ensure that this reflects the structure of MLIR, I played around with the MLIR converter and discovered a minor flaw there. As I prefer at least partially tested code, I fixed the issue with the VectorAttr vs. DenseElementAttr as well.

fixes #31 fixes #29

As a next step, we have to adapt the ChocoPy project for these changes, furthermore, I would like to have a proper tool that encapsulates the converter.

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, otherwise seems good!
I think we should discuss at some point what is our objectives with those dialects. I really dislike copying MLIR too much, since DenseIntOrFPElementsAttr is really ugly imo. But this is a separate discussion!

src/xdsl/dialects/std.py Outdated Show resolved Hide resolved
src/xdsl/dialects/memref.py Outdated Show resolved Hide resolved
src/xdsl/dialects/memref.py Outdated Show resolved Hide resolved
src/xdsl/dialects/builtin.py Show resolved Hide resolved
src/xdsl/dialects/builtin.py Show resolved Hide resolved
src/xdsl/dialects/arith.py Outdated Show resolved Hide resolved
src/xdsl/dialects/arith.py Show resolved Hide resolved
@math-fehr
Copy link
Collaborator

Besides the last comment, this is perfect for me!

@Dinistro
Copy link
Collaborator Author

Dinistro commented Jan 2, 2022

@math-fehr I added a minor parser fix to this PR as I need it for the next xdsl release.

@Dinistro Dinistro force-pushed the feature_arith_dialect branch from c944a71 to 4512467 Compare January 2, 2022 14:57
@Dinistro
Copy link
Collaborator Author

Dinistro commented Jan 2, 2022

@math-fehr I would suggest that we merge this an release a new version of xdsl. Afterwards we can fix the minor breaking changes in https://github.com/compiling-techniques/ChocoPyCompiler/tree/update-xdsl

@math-fehr math-fehr merged commit bda856c into main Jan 2, 2022
@math-fehr math-fehr deleted the feature_arith_dialect branch July 20, 2022 12:45
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

Successfully merging this pull request may close these issues.

Adapt vector and tensor structures to mirror MLIR Refactor std into std and arith dialects.
3 participants