compiler: Misc enhancements for lowering of parlang backends #2878
compiler: Misc enhancements for lowering of parlang backends #2878FabioLuporini wants to merge 7 commits intomainfrom
Conversation
| if not exprs: | ||
| return properties | ||
|
|
||
| # Auto-detect prefetchable Dimensions |
There was a problem hiding this comment.
now unused, hence dropping
| return schedule.rebuild(*processed, rmapper=rmapper) | ||
|
|
||
|
|
||
| def optimize_schedule_maxpar(schedule): |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
@mloubout dropped as per your suggestion
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2878 +/- ##
==========================================
+ Coverage 83.42% 83.44% +0.01%
==========================================
Files 248 248
Lines 51262 51306 +44
Branches 4431 4428 -3
==========================================
+ Hits 42765 42811 +46
- Misses 7735 7738 +3
+ Partials 762 757 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
devito/ir/iet/efunc.py
Outdated
| libs: tuple = () | ||
|
|
||
| @classmethod | ||
| def from_body(cls, body): |
There was a problem hiding this comment.
Does this really need a method? That just EFuncMetadata(body=body)
There was a problem hiding this comment.
Actually, it does improve readability elsewhere, so I'm not entirely opposed
There was a problem hiding this comment.
no, AI garbage, removing
devito/ir/iet/efunc.py
Outdated
|
|
||
| @classmethod | ||
| def compose(cls, *items): | ||
| items = tuple(i for i in items if i is not None) |
There was a problem hiding this comment.
Why would an item be None?
There was a problem hiding this comment.
AI garbage leftover, removing
| return cls() | ||
|
|
||
| return cls( | ||
| body=items[-1].body, |
There was a problem hiding this comment.
this is because the idea is that you may have a sequence of IET passes
pseudocode example:
v0 = pass0(...)
v1 = pass1(..., body=v0.body)
v2 = pass2(..., body=v1.body)
and each of those passes introduces different includes/libs/efuncs/...
in the end you want the union of various includes/libs/efuncs/... but the body of the last pass
so you EfuncMeta.compose(v0, v1, v2) and that way it will use v2's body
|
|
||
| return cls( | ||
| body=items[-1].body, | ||
| efuncs=tuple(chain.from_iterable(i.efuncs for i in items)), |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
no it's an iterable of an iterable that you're chaining together here
devito/ir/iet/efunc.py
Outdated
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class EFuncMetadata: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
yes, one of the reasons I put it in OSS... but that would be massive changes, I'd rather do it incrementally
also, changing the name to EFuncMeta
devito/ir/iet/efunc.py
Outdated
| libs: tuple = () | ||
|
|
||
| @classmethod | ||
| def from_body(cls, body): |
| pass | ||
|
|
||
|
|
||
| class ThreadArrive(Fence): |
There was a problem hiding this comment.
Is this to make use of more sophisticated/granular thread barriers to reduce idle time somewhere?
There was a problem hiding this comment.
pretty much yes
No description provided.