Skip to content

Choose memory space from policy execution space#389

Merged
kennykos merged 4 commits intomainfrom
kennykos/array-mem-spaces
Mar 8, 2026
Merged

Choose memory space from policy execution space#389
kennykos merged 4 commits intomainfrom
kennykos/array-mem-spaces

Conversation

@kennykos
Copy link
Copy Markdown
Collaborator

@kennykos kennykos commented Mar 4, 2026

Currently, pykokkos chooses a memory space based off the default execution space, which leads to bugs
when there is a mismatch between policy and default execution spaces.

This PR requires a memory space to be explicitly passed into convert_array, ensuring that the python array api object is cast to the correct memory space.

kennykos added 3 commits March 3, 2026 19:10
Currently, pykokkos chooses a memory space based off
the default execution space, which leads to bugs
when there is a mismatch between policy and default
execution spaces.

This PR requires a memory space to be explicitly passed
in to pk.array, ensuring that the python array api
object is cast to the correct memory space.
@kennykos kennykos requested a review from IvanGrigorik March 5, 2026 15:46
Copy link
Copy Markdown
Collaborator

@IvanGrigorik IvanGrigorik left a comment

Choose a reason for hiding this comment

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

Overall LG
One comment

Comment thread pykokkos/interface/parallel_dispatch.py
Comment thread pykokkos/interface/parallel_dispatch.py
@kennykos kennykos requested a review from IvanGrigorik March 5, 2026 20:29
Copy link
Copy Markdown
Collaborator

@IvanGrigorik IvanGrigorik left a comment

Choose a reason for hiding this comment

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

nice
thanks!

@kennykos kennykos merged commit 3870603 into main Mar 8, 2026
17 checks passed
@kennykos kennykos deleted the kennykos/array-mem-spaces branch March 8, 2026 21:42
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.

2 participants