We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f52fd50 commit 57d4a6dCopy full SHA for 57d4a6d
1 file changed
content/cupy.md
@@ -175,6 +175,12 @@ For example, the following code snippet creates an array on GPU 1:
175
>>> print("x_gpu1 is on device:" x_gpu1.device)
176
```
177
178
+Sometimes it is more convenient to set the device globally:
179
+```
180
+>>> import cupy as cp
181
+>>> cp.cuda.runtime.setDevice(1)
182
183
+
184
All CuPy operations (except for multi-GPU features
185
and device-to-device copy) are performed
186
on the currently active device.
0 commit comments