-
Notifications
You must be signed in to change notification settings - Fork 17
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
Inflated geometric factors storage for affine elements #314
Comments
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. |
@kaushikcfd Could you elaborate on the circumstance under which you've observed this? Do you happen to know why this happens? |
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. import grudge
import pyopencl as cl
from meshmode.discretization.connection import FACE_RESTR_INTERIOR
from grudge.array_context import get_reasonable_array_context_class
from meshmode.mesh.generation import generate_regular_rect_mesh
ctx = cl.create_some_context()
cq = cl.CommandQueue(ctx)
ref_actx = get_reasonable_array_context_class(lazy=False, distributed=False)(cq)
actx = get_reasonable_array_context_class(lazy=True, distributed=False)(cq)
mesh = generate_regular_rect_mesh(a=(-0.5, -0.5),
b=(0.5, 0.5),
nelements_per_axis=(16, 16))
dcoll = grudge.make_discretization_collection(ref_actx, mesh, order=4)
nx, ny = actx.thaw(dcoll.normal(FACE_RESTR_INTERIOR))
assert nx[0].shape[-1] == 1 # fails |
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 |
In #310 (comment), @kaushikcfd says:
If true, this wouldn't just increase memory footprint, but also memory bandwidth requirements.
cc @majosm @matthiasdiener
The text was updated successfully, but these errors were encountered: