Skip to content

compiler: Misc enhancements for lowering of parlang backends #2878

Open
FabioLuporini wants to merge 6 commits intomainfrom
more-TMA-enhance
Open

compiler: Misc enhancements for lowering of parlang backends #2878
FabioLuporini wants to merge 6 commits intomainfrom
more-TMA-enhance

Conversation

@FabioLuporini
Copy link
Copy Markdown
Contributor

No description provided.

if not exprs:
return properties

# Auto-detect prefetchable Dimensions
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

now unused, hence dropping

return schedule.rebuild(*processed, rmapper=rmapper)


def optimize_schedule_maxpar(schedule):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is 95% just like before, but it now also triggers in some rare cases excited in PRO

def _time_buffering_default(self):
return self._time_buffering and not isinstance(self.save, Buffer)

def _evaluate(self, **kwargs):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mloubout dropped as per your suggestion

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 83.95062% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.44%. Comparing base (c189f61) to head (8b6731a).

Files with missing lines Patch % Lines
devito/ir/iet/efunc.py 58.33% 10 Missing ⚠️
devito/ir/clusters/cluster.py 92.59% 2 Missing ⚠️
devito/types/parallel.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2878      +/-   ##
==========================================
+ Coverage   83.42%   83.44%   +0.01%     
==========================================
  Files         248      248              
  Lines       51262    51309      +47     
  Branches     4431     4428       -3     
==========================================
+ Hits        42765    42813      +48     
- Misses       7735     7739       +4     
+ Partials      762      757       -5     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.81% <81.08%> (+0.04%) ⬆️
pytest-gpu-gcc- 78.05% <83.95%> (+0.02%) ⬆️
pytest-gpu-icx- 77.65% <83.95%> (+0.02%) ⬆️
pytest-gpu-nvc-nvidiaX 69.33% <81.08%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

libs: tuple = ()

@classmethod
def from_body(cls, body):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this really need a method? That just EFuncMetadata(body=body)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seconded

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, it does improve readability elsewhere, so I'm not entirely opposed


@classmethod
def compose(cls, *items):
items = tuple(i for i in items if i is not None)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why would an item be None?

return cls()

return cls(
body=items[-1].body,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why -1?


return cls(
body=items[-1].body,
efuncs=tuple(chain.from_iterable(i.efuncs for i in items)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

that's just our as_tuple and should be used. If this chain.from_iterable is more efficient then as_tuple should be updated (same for as_list)



@dataclass(frozen=True)
class EFuncMetadata:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this clearly looks like it's for an IET pass return, it should be used throughout or at least for the efunc realted ones.

libs: tuple = ()

@classmethod
def from_body(cls, body):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seconded

pass


class ThreadArrive(Fence):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this to make use of more sophisticated/granular thread barriers to reduce idle time somewhere?

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