Skip to content

compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features #2840

Open
FabioLuporini wants to merge 25 commits intomainfrom
the-TMA
Open

compiler: Enhance IR to support more advanced parlang (CUDA/HIP/SYCL) features #2840
FabioLuporini wants to merge 25 commits intomainfrom
the-TMA

Conversation

@FabioLuporini
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 81.86813% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.97%. Comparing base (676b8bf) to head (1213648).

Files with missing lines Patch % Lines
devito/passes/iet/definitions.py 60.60% 7 Missing and 6 partials ⚠️
devito/passes/iet/engine.py 31.25% 10 Missing and 1 partial ⚠️
devito/ir/clusters/cluster.py 63.63% 4 Missing ⚠️
devito/ir/support/guards.py 0.00% 1 Missing and 2 partials ⚠️
devito/arch/archinfo.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2840    +/-   ##
========================================
  Coverage   78.97%   78.97%            
========================================
  Files         248      248            
  Lines       50901    51003   +102     
  Branches     4395     4403     +8     
========================================
+ Hits        40199    40280    +81     
- Misses       9904     9921    +17     
- Partials      798      802     +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@mloubout mloubout left a 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])
Copy link
Contributor

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

Copy link
Contributor

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}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok fixing, Ed has a point

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)))
Copy link
Contributor

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])
Copy link
Contributor

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()])
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

class Terminal:

"""
Abstract base class for all terminal objects, that is, those objects
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tweaking it

btw:

a leaf node with no children

by definition a leaf node has no children

Copy link
Contributor

Choose a reason for hiding this comment

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

You know what I was saying about tautology...


Reserved objects have the following properties:

* `estimate_cost(o) = 0`, where `o` is an instance of Reserved
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will delete that bit as it's irrelevant and perhaps confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants