Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update spec/draft/design_topics/device_support.rst
Co-authored-by: Lucy Liu <jliu176@gmail.com>
  • Loading branch information
crusaderky and lucyleeow authored Apr 23, 2025
commit 54816e9e01408b0f0063da7dce18b0c793d3564a
2 changes: 1 addition & 1 deletion spec/draft/design_topics/device_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ rather than hard requirements:
- Respect explicit device assignment (i.e. if the input to the ``device=`` keyword is not ``None``, guarantee that the array is created on the given device, and raise an exception otherwise).
- 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).
- Raise an exception if an operation involves arrays on different devices (i.e. avoid implicit data transfer between devices).
- When a function accepts a mix of arrays and Python scalars, the scalars should inherit the device of the arrays, much like it happens with :ref:`type-promotion`.
- When a function accepts a mix of arrays and Python scalars, the scalars should inherit the device of the arrays, much like what happens with :ref:`type-promotion`.
- Use a default for ``device=None`` which is consistent between functions within the same library.
- If a library has multiple ways of controlling device placement, the most explicit method should have the highest priority:

Expand Down