-
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
Introduce DISCR_TAG_CONSTANT
(e.g. for outputs of elementwise reductions)
#251
Comments
Everything you describe, at least for now, is by design. I'll try to describe the reasoning for this, and then we can see whether this is something that should change. The intention is for the output of the routine to be treated as if it had a normal Since the PyOpenCL If nothing else, I suspect this behavior should be documented better. It is the same for all elementwise reductions. |
Makes sense. I think something extra might need to be done in the case where someone tries to meshmode.dof_array.InconsistentDOFArray: DOFArray group 0 array has unexpected shape. (observed: (1976, 1), expected: (1976, 10)) (I can just multiply by |
I've spent some time thinking about this (typing different variants of this reply), and I actually don't think the current approach of trying to pass off a single-DOF-per-element array as a "full" I also don't want to go back to returning the same value plastered across an element; in addition to inefficiency (which lazy may or may not be able to remove), it's redundant representation which is not nice. So my proposal is that we introduce another discretization tag, How does that sound? |
dt_geometric_factors
returns different shapes for lazy and eagerDISCR_TAG_CONSTANT
DISCR_TAG_CONSTANT
DISCR_TAG_CONSTANT
(e.g. for reduction outputs)
DISCR_TAG_CONSTANT
(e.g. for reduction outputs)DISCR_TAG_CONSTANT
(e.g. for outputs of elementwise reductions)
dt_geometric_factors
is returning different array shapes in lazy vs. eager. In eager it returns a volume-dd-shapedDOFArray
, but in lazy it returns aDOFArray
with 1 value per element. This discrepancy appears to originate in_apply_elementwise_reduction
, where different code is executed based on the value ofactx.supports_scalar_broadcasting
. I can get the expected (volume-dd-shaped) result in both lazy and eager if I comment out theTrue
case.The
True
case looks like this:I suspect the
reshape(-1, 1)
should be changed to something else, but I'm not sure what numpy-like constructs are supported for the array types being operated on here. Any suggestions?The text was updated successfully, but these errors were encountered: