Skip to content

Commit bac887c

Browse files
committed
Clarify input arrays in device placement
1 parent 772fb46 commit bac887c

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

spec/2021.12/design_topics/device_support.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ rather than hard requirements:
8181

8282
1. If ``device=`` keyword is specified, that always takes precedence
8383

84-
2. If ``device=None``, then use the setting from a context manager, if set.
84+
2. If ``device=None``, then use the device of the input array(s), if any.
8585

86-
3. If no context manager was used, then use the global default device/strategy
86+
3. If there are no input arrays, then use the setting from a context manager, if set.
87+
88+
4. If no context manager was used, then use the global default device/strategy
8789

8890
.. _device-out-of-scope:
8991

spec/2022.12/design_topics/device_support.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ rather than hard requirements:
8181

8282
1. If ``device=`` keyword is specified, that always takes precedence
8383

84-
2. If ``device=None``, then use the setting from a context manager, if set.
84+
2. If ``device=None``, then use the device of the input array(s), if any.
8585

86-
3. If no context manager was used, then use the global default device/strategy
86+
3. If there are no input arrays, then use the setting from a context manager, if set.
87+
88+
4. If no context manager was used, then use the global default device/strategy
8789

8890
.. _device-out-of-scope:
8991

spec/2023.12/design_topics/device_support.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ rather than hard requirements:
8282

8383
1. If ``device=`` keyword is specified, that always takes precedence
8484

85-
2. If ``device=None``, then use the setting from a context manager, if set.
85+
2. If ``device=None``, then use the device of the input array(s), if any.
8686

87-
3. If no context manager was used, then use the global default device/strategy
87+
3. If there are no input arrays, then use the setting from a context manager, if set.
88+
89+
4. If no context manager was used, then use the global default device/strategy
8890

8991
.. _device-out-of-scope:
9092

spec/2024.12/design_topics/device_support.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ rather than hard requirements:
8282

8383
1. If ``device=`` keyword is specified, that always takes precedence
8484

85-
2. If ``device=None``, then use the setting from a context manager, if set.
85+
2. If ``device=None``, then use the device of the input array(s), if any.
8686

87-
3. If no context manager was used, then use the global default device/strategy
87+
3. If there are no input arrays, then use the setting from a context manager, if set.
88+
89+
4. If no context manager was used, then use the global default device/strategy
8890

8991
.. _device-out-of-scope:
9092

spec/draft/design_topics/device_support.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ rather than hard requirements:
8282

8383
1. If ``device=`` keyword is specified, that always takes precedence
8484

85-
2. If ``device=None``, then use the setting from a context manager, if set.
85+
2. If ``device=None``, then use the device of the input array(s), if any.
8686

87-
3. If no context manager was used, then use the global default device/strategy
87+
3. If there are no input arrays, then use the setting from a context manager, if set.
88+
89+
4. If no context manager was used, then use the global default device/strategy
8890

8991
.. _device-out-of-scope:
9092

0 commit comments

Comments
 (0)