-
Notifications
You must be signed in to change notification settings - Fork 78
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
core: Add BlockInsertPoint to simplify the builder API #3703
Conversation
127af6d
to
8075761
Compare
8ca2b96
to
4cb9ea2
Compare
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
8075761
to
7d12dd0
Compare
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
7d12dd0
to
9efdda7
Compare
Could |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3703 +/- ##
==========================================
+ Coverage 91.23% 91.25% +0.01%
==========================================
Files 459 459
Lines 57307 57351 +44
Branches 5532 5533 +1
==========================================
+ Hits 52286 52333 +47
+ Misses 3594 3593 -1
+ Partials 1427 1425 -2 ☔ View full report in Codecov by Sentry. |
LGTM modulo the missing tests. |
63748c2
to
05c7401
Compare
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
9efdda7
to
f4bc3bb
Compare
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
f4bc3bb
to
bd3bca3
Compare
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
I can make them generic, I am just a bit scared of what the documentation will look like. |
Maybe just leave it as is. The documentation is important |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of points that don't need to be dealt with in this PR:
- Should InsertPoint be renamed to OpInsertPoint?
- Is it possible/preferable to make the initializer private and force the use of the static methods to construct both
InsertPoint
s andBlockInsertPoint
s, letting the runtime check be dropped?
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
`BlockInsertPoint` acts the same as `InsertPoint`, but for blocks. Its equivalent in MLIR is `Block::iterator`. stack-info: PR: #3703, branch: math-fehr/stack/7
Yes, I think we could rename
I never found an actual way to make Python constructors private, which otherwise yes that would make things much better. |
bd3bca3
to
84b071f
Compare
Stacked PRs:
core: Add BlockInsertPoint to simplify the builder API
BlockInsertPoint
acts the same asInsertPoint
, but for blocks.Its equivalent in MLIR is
Block::iterator
.