FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: clarify input arrays in device placement by crusaderky · Pull Request #919 · data-apis/array-api · GitHub

docs: clarify input arrays in device placement - #919

Merged
kgryte merged 6 commits into
data-apis:mainfrom
crusaderky:device
Jun 23, 2025
Merged

docs: clarify input arrays in device placement#919
kgryte merged 6 commits into
data-apis:mainfrom
crusaderky:device

Conversation

crusaderky commented Apr 1, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Clarify how input arrays should be considered for device placement.
This new line is a repetition of bullet point 2, three lines above:

Preserve device assignment as much as possible (e.g. output arrays from a function are expected to be on the same device as input arrays to the function).

However, I am observing very high levels of ambiguity among the community on the interpretation of this paragraph, where I've had multiple people insist that the device set in the context manager or global default device should trump the device of input arrays. At which point, since all real-life backends always have a global default device, input-to-output device propagation would fly out of the window.

rgommers commented Apr 1, 2025

Copy link
Copy Markdown
Member

This change seems reasonable to me, it's more of a clarification than anything else. This numbered list was written with creation functions in mind I believe. The device= keyword descriptions already say something like "if device is None, use the device from the input array" in the relevant cases.

Before merging this, let's ensure the discussions in data-apis/array-api-compat#293 (and perhaps other places) have been settled to ensure it's all consistent.

kgryte added this to the v2025 milestone Apr 2, 2025
kgryte added the topic: Device Handling Device handling. label Apr 2, 2025
kgryte changed the title Clarify input arrays in device placement docs: clarify input arrays in device placement Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

XREF #918
@kgryte ready for review and merge

Co-authored-by: Lucy Liu <jliu176@gmail.com>

kgryte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

kgryte commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

Based on linked discussions and workgroup discussion, the proposed rule changes have agreement. As such, I'll go ahead and merge.

kgryte merged commit 2d3abf7 into data-apis:main Jun 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: Device Handling Device handling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL