You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inflated geometric factors storage for affine elements #314
I noticed a subtle and sub-optimal behavior that is worth noting. If we are using PyOpenCLActx as a setup actx and PytatoActx as an operational actx, then the frozen geometric factors (such as normals) would be stored at per-DOF even for affine geometry mappings. Such use-cases will bump memory footprint.
If true, this wouldn't just increase memory footprint, but also memory bandwidth requirements.
I did not observe this in any production-related drivers. But I was writing some tests for #310 and noticed this behavior and thought sharing would be essential so that others do not repeat the same mistake.
I have attached a minimal reproducer script for posterity.
the setup actx is unconditionally used to populate the normal cache, making this an interface bug more than a "bug bug". Perhaps the most reasonable response is to deprecate DiscretizationCollection.normal. grudge.geometry.normal takes an actx and does not have this issue (and it's more convenient to use because there's no freeze/thaw cycle needed).
Activity
majosm commentedon Aug 10, 2023
I'm told that we don't use a separate array context for init anymore in Y3, so it looks like this isn't affecting us at the moment.
inducer commentedon Aug 10, 2023
@kaushikcfd Could you elaborate on the circumstance under which you've observed this? Do you happen to know why this happens?
kaushikcfd commentedon Aug 11, 2023
I did not observe this in any production-related drivers. But I was writing some tests for #310 and noticed this behavior and thought sharing would be essential so that others do not repeat the same mistake.
I have attached a minimal reproducer script for posterity.
inducer commentedon Aug 11, 2023
Thanks for providing the reproducer. AFAICT, this affects only the normals. The main issue is that here:
grudge/grudge/discretization.py
Line 770 in 0d501c0
the setup actx is unconditionally used to populate the normal cache, making this an interface bug more than a "bug bug". Perhaps the most reasonable response is to deprecate
DiscretizationCollection.normal.grudge.geometry.normaltakes an actx and does not have this issue (and it's more convenient to use because there's no freeze/thaw cycle needed).Deprecate DiscretizationCollection.normal (closes gh-314)
inducer commentedon Aug 11, 2023
#315
Deprecate DiscretizationCollection.normal (closes inducergh-314)