Comments (10)
I'm not sure. For arithmetic, I think requiring thawing makes sense. For call_loopy
, the array context is supplied (as the self
argument to call_loopy
), so it's less clear that it's needed.
from meshmode.
For the PyOpenCL array context, passing an un-thawed array is hypothetically fine: It's a constant array that doesn't have a queue.
For the lazy array context, we could define passing an un-thawed array as implicitly producing a DataWrapper
, with similar semantics.
from meshmode.
@kaushikcfd, what do you think?
from meshmode.
Agree with the proposal that frozen read-only array inputs should be thawed inside call_loopy
. It doesn't introduce any performance hits and provides a more convenient interface.
from meshmode.
frozen read-only array inputs should be thawed inside call_loopy
What is "thawing" to you anyway, in this instance? (Remember we're trying to define semantics here IMO: It's not a given what that means.) To me: thawing in CL means "add a queue", thawing in lazy means... hm... stick in a DataWrapper
. Maybe thaw
is what I wanted anyay. :)
from meshmode.
I thought the semantics for "thaw"-ing lazy arrays was already defined in #104. The same can be transmitted to the thawing in the context of call_loopy
, which I believe is reasonable.
from meshmode.
Fair.
I guess the main question then is whether we'll require the user to explicitly thaw, or whether we'll implicitly do what's necessary in call_loopy
. FWIW, IMO if we do anything implicitly, we should only do so for read-only arrays.
Upside of implicit treatment:
- Convenience
Downside of implicit treatment:
- We may wind up with a few separate
DataWrapper
s for the same data. (that are, however, pretty straightforward to clean up)
from meshmode.
I vote for the implicit treatment. I think the benefits of a cleaner interface outweigh the downsides of a polluted pt.Namespace()
.
from meshmode.
OK, implicit is good by me. Ready to close?
from meshmode.
Yep, resolved from my end too.
from meshmode.
Related Issues (20)
- Automatically fix orientation of volume meshes from gmsh? HOT 3
- Pickling DOFArrays loses metadata HOT 1
- Resampling can lead to expressions that index along a 0-long axis HOT 1
- `dim` and `ambient_dim` should be attributes of the mesh
- Remove `FirstAxisIsElementsTag` and related transform infrastructure
- Loopy cache collision in CI HOT 4
- Make it clearer that `default_simplex_group` is not for external use HOT 1
- Performance of `generate_box_mesh` HOT 1
- [Direct Connection] Group Contributions (probably) should not be summed HOT 2
- Mesh check in `make_same_mesh_connection` too strict? HOT 2
- Rename Discretization(Element|Face|AmbientDim|TopologicalDim|DOF)AxisTag -> (Element|Face|AmbientDim|TopologicalDim|DOF)AxisTag? HOT 1
- `libfabric=1.17.0-3` on Debian causes MPI tests to fail with `MPI_ERR_OTHER` HOT 3
- Axis tagging in nodal-to-modal and modal-to-nodal connections HOT 4
- Find, extract elements near a point
- Error when dumping/loading TensorProductElementGroup mesh via pickle HOT 1
- TP element orientation flips on Gmsh read HOT 5
- Failing Firedrake test
- 3d element orientation for hexes HOT 4
- Interface with meshio HOT 9
- Recent update breaks mirgecom HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshmode.