-
Notifications
You must be signed in to change notification settings - Fork 248
compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features #2840
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2840 +/- ##
==========================================
- Coverage 78.95% 78.94% -0.01%
==========================================
Files 248 248
Lines 50877 50979 +102
Branches 4394 4402 +8
==========================================
+ Hits 40170 40247 +77
- Misses 9908 9928 +20
- Partials 799 804 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mloubout
left a comment
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.
Mintoi comments but was already reviewed in the previous one so looks good
| return {i for i in self.free_symbols if i.is_Dimension} | idims | ||
| dims_exprs = {i for i in self.free_symbols if i.is_Dimension} | ||
|
|
||
| dims_implicit = set().union(*[set(e.implicit_dims) for e in self.exprs]) |
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.
don't need set(e.implicit_dims) just e.implicit_dims
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.
Could even just be dims_implicit = {d for e in self.exprs for d in e.implicit_dims}
| sub_iterators = dict([(k, tuple(filter_ordered(as_tuple(v)))) | ||
| for k, v in (sub_iterators or {}).items()]) | ||
| sub_iterators = sub_iterators or {} | ||
| sub_iterators = {d: tuple(filter_ordered(as_tuple(v))) |
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.
That's quite a lot of tuple conversion but doubt can be changed
| return {i for i in self.free_symbols if i.is_Dimension} | idims | ||
| dims_exprs = {i for i in self.free_symbols if i.is_Dimension} | ||
|
|
||
| dims_implicit = set().union(*[set(e.implicit_dims) for e in self.exprs]) |
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.
Could even just be dims_implicit = {d for e in self.exprs for d in e.implicit_dims}
|
|
||
| dims_implicit = set().union(*[set(e.implicit_dims) for e in self.exprs]) | ||
|
|
||
| syms_guards = set().union(*[e.free_symbols for e in self.guards.values()]) |
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.
You can do the same with this one, which will improve readability and homogeneity
| class Terminal: | ||
|
|
||
| """ | ||
| Abstract base class for all terminal objects, that is, those objects |
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.
This docstring seems a little tautologous - a terminal is an object collected by retrieve_terminals which is a function that retrieves objects that are terminals. Might be worth noting what makes an object "terminal"? I'm guessing anything which is always a leaf node with no children?
|
|
||
| Reserved objects have the following properties: | ||
|
|
||
| * `estimate_cost(o) = 0`, where `o` is an instance of Reserved |
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.
Is this enforced by a subclass or superclass?
No description provided.