Skip to content
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

Issues with zeros et al functions of array contexts #161

Open
inducer opened this issue May 2, 2022 · 4 comments
Open

Issues with zeros et al functions of array contexts #161

inducer opened this issue May 2, 2022 · 4 comments

Comments

@inducer
Copy link
Owner

inducer commented May 2, 2022

  • Decide between actx.np.zeros and actx.zeros.
  • zeros_like doesn't currently retain metadata from its argument, resulting in lazy compile issues.

cc @majosm @MTCam @kaushikcfd

@alexfikl
Copy link
Collaborator

alexfikl commented May 2, 2022

actx.zeros doesn't work on containers (like all the other methods in actx), so they're not quite equivalent. Should it?

@inducer
Copy link
Owner Author

inducer commented May 2, 2022

I don't see why it shouldn't. actx.freeze is (legitimately) growing container support (#158).

@alexfikl
Copy link
Collaborator

Did some of this work in #178:

  • actx.zeros_like and actx.empty_like work on containers.
  • at least the eager pyopencl version propagates tags in both of those.

actx.zeros and actx.empty can't really get support for array containers, since they don't have a template to mimic. Also, there's no actx.np.zeros, so that should be done as well!

@inducer
Copy link
Owner Author

inducer commented Jun 28, 2022

Thanks for working on that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants