-
Notifications
You must be signed in to change notification settings - Fork 229
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
compiler: Avoid allocating Bundles on the host if transient #2503
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2503 +/- ##
==========================================
- Coverage 87.35% 87.29% -0.07%
==========================================
Files 238 238
Lines 45574 45609 +35
Branches 4035 4042 +7
==========================================
+ Hits 39813 39814 +1
- Misses 5079 5112 +33
- Partials 682 683 +1 ☔ View full report in Codecov by Sentry. |
@@ -214,6 +216,38 @@ def _alloc_mapped_array_on_high_bw_mem(self, site, obj, storage, *args): | |||
|
|||
storage.update(obj, site, allocs=alloc, frees=free, efuncs=(efunc0, efunc1)) | |||
|
|||
def _alloc_bundle_struct_on_high_bw_mem(self, site, obj, storage): |
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.
Nitpick: some comments would help reduce the bus factor of this code
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.
I agree, if it turns green I will add it to the to-be-rebased #2500
elif i.is_LocalObject: | ||
self._alloc_object_on_low_lat_mem(iet, i, storage) | ||
elif i.is_Array or i.is_Bundle: | ||
|
||
elif i.is_Bundle: |
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 there any way to reduce the "death by conditionals" here?
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.
After spending a couple of hours on this very matter this morning, I'm inclined to say that it's pretty challenging to come up with one. The problem is that there's a combinatorial explosion of possibilities (luckily with small exponent), and all those if
s implement such space
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.
I suppose it's all attributes too, which makes it even more challenging without obfuscating what's going on
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.
if the implicit question was "can you use singledispatch", yeah, you got it right
Impacted test tweaked in PRO