Skip to content

PyOpenCLActx: fixes to np.where, actx.to_numpy#357

Merged
inducer merged 3 commits into
mainfrom
some_fixes_to_pyopencl_actx
May 23, 2026
Merged

PyOpenCLActx: fixes to np.where, actx.to_numpy#357
inducer merged 3 commits into
mainfrom
some_fixes_to_pyopencl_actx

Conversation

@kaushikcfd
Copy link
Copy Markdown
Collaborator

Please refer to commit-by-commit description for the two fixes.

@kaushikcfd kaushikcfd requested review from alexfikl and inducer May 10, 2026 18:35
Copy link
Copy Markdown
Collaborator

@alexfikl alexfikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Left a couple of nitpicks, but besides that:

  • Where did these show up? For my own curiosity 😁
  • Add some small tests? Is the transpose test supposed to test the non-continuous copy?

Comment thread arraycontext/impl/pyopencl/__init__.py Outdated
Comment thread arraycontext/impl/pyopencl/__init__.py Outdated
Comment thread arraycontext/impl/pyopencl/fake_numpy.py
@kaushikcfd kaushikcfd force-pushed the some_fixes_to_pyopencl_actx branch from 143f99b to 6af81f0 Compare May 10, 2026 19:22
@kaushikcfd
Copy link
Copy Markdown
Collaborator Author

Add some small tests? Is the transpose test supposed to test the non-continuous copy?

The linked regression exercises the code path. Pyopencl.Array.transpose is a no-op on the cl.Device simply creates a copy of the buffer with different strides.

pyopencl.array does not allow array branches with unequal dtypes.
@kaushikcfd kaushikcfd force-pushed the some_fixes_to_pyopencl_actx branch 2 times, most recently from b9ad7d8 to 48dd357 Compare May 11, 2026 03:57
Comment thread arraycontext/impl/pyopencl/__init__.py
Comment thread arraycontext/impl/pyopencl/__init__.py
@kaushikcfd kaushikcfd force-pushed the some_fixes_to_pyopencl_actx branch from 48dd357 to 2a87adf Compare May 11, 2026 16:34
@inducer
Copy link
Copy Markdown
Owner

inducer commented May 23, 2026

Thx!

@inducer inducer merged commit 8762568 into main May 23, 2026
11 checks passed
@inducer inducer deleted the some_fixes_to_pyopencl_actx branch May 23, 2026 16:35
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

Successfully merging this pull request may close these issues.

3 participants