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.

@alexfiklalexfikl left a comment

Copy link
Copy Markdown
Collaborator

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 threadarraycontext/impl/pyopencl/__init__.py Outdated
Comment threadarraycontext/impl/pyopencl/__init__.py Outdated
Comment threadarraycontext/impl/pyopencl/fake_numpy.py
@kaushikcfd
kaushikcfdforce-pushed the some_fixes_to_pyopencl_actx branch from 143f99b to 6af81f0CompareMay 10, 2026 19:22
@kaushikcfd

Copy link
Copy Markdown
CollaboratorAuthor

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
kaushikcfdforce-pushed the some_fixes_to_pyopencl_actx branch 2 times, most recently from b9ad7d8 to 48dd357CompareMay 11, 2026 03:57
Comment threadarraycontext/impl/pyopencl/__init__.py
Comment threadarraycontext/impl/pyopencl/__init__.py
@kaushikcfd
kaushikcfdforce-pushed the some_fixes_to_pyopencl_actx branch from 48dd357 to 2a87adfCompareMay 11, 2026 16:34
@inducer

Copy link
Copy Markdown
Owner

Thx!

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

@kaushikcfd@inducer@alexfikl