Remove stateful updates#192
Merged
Merged
Conversation
This was referenced May 21, 2021
inducer
reviewed
May 25, 2021
inducer
left a comment
Owner
There was a problem hiding this comment.
One drive-by comment here for now. More soon.
0fa1698 to
b506b47
Compare
thomasgibson
commented
May 27, 2021
alexfikl
reviewed
May 27, 2021
Comment on lines
+429
to
+430
| # Special case which avoids a copy | ||
| return _flatten(ary[0]) |
Collaborator
There was a problem hiding this comment.
Suggested change
| # Special case which avoids a copy | |
| return _flatten(ary[0]) | |
| # can avoid a copy if reshape succeeds | |
| return _flatten(ary[0]) |
?
Do you think the same special case should be added to unflatten? That way it has the potential of doing a zero-copy roundtrip. I don't know of any place that would actually make use of that though.
Collaborator
Author
There was a problem hiding this comment.
Maybe? I'm a bit hesitant to touch unflatten and there are no stateful updates going on there. @inducer?
Collaborator
There was a problem hiding this comment.
Fair point! I'm fine with leaving it as is.
Co-authored-by: Alex Fikl <alexfikl@gmail.com>
This was referenced Jun 2, 2021
inducer
approved these changes
Jun 2, 2021
Comment on lines
+318
to
+333
| return DOFArray( | ||
| actx, | ||
| data=tuple( | ||
| actx.call_loopy( | ||
| knl(), | ||
| mat=self.get_local_face_mass_matrix(afgrp, volgrp, dtype), | ||
| vec=vec_i.reshape( | ||
| volgrp.mesh_el_group.nfaces, | ||
| volgrp.nelements, | ||
| afgrp.nunit_dofs | ||
| ) | ||
| )["result"] | ||
| for afgrp, volgrp, vec_i in zip(all_faces_discr.groups, | ||
| vol_discr.groups, vec) | ||
| ) | ||
| ) |
Owner
There was a problem hiding this comment.
I'm not necessarily pushing for it, but is there any reason this didn't become an einsum?
thomasgibson
added a commit
that referenced
this pull request
Jun 8, 2021
inducer
pushed a commit
that referenced
this pull request
Jun 8, 2021
thomasgibson
added a commit
that referenced
this pull request
Jun 9, 2021
inducer
added a commit
that referenced
this pull request
Jun 13, 2021
inducer
added a commit
that referenced
this pull request
Jun 18, 2021
* Revert "Revert connection kernels to pre-#192 (#217)" This reverts commit 35d4520. * Add custom iname tags to DirectDiscretizationConnection kernels * Point req.txt for arraycontext, loopy * Point req.txt loopy back to main * Firedrake CI install: use loopy from git * DirectCnx/InterpolationBatch: add, use _global_from_element_indices * Do not update loopy in Fdrake CI for now * Point req.txt back to main for arraycontext * DirectConnection: add code path with in-place updates * DirectConnection: revert kernel transforms back to old-style for non-inplace kernels * Ensure test coverage of non-inplace DirectConnection kernels * InterpolationBatch: Drop transform strategy based on iname tags for now * DirectDiscretizationConnection: Fix kernel names, hash keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supercedes: #180 and #58
Requires: inducer/arraycontext#8 and inducer/arraycontext#9