We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DEFAULT_DEVICE
1 parent 3bb3be9 commit 26a1438Copy full SHA for 26a1438
src/xla/Client.jl
@@ -16,10 +16,10 @@ function platform_name end
16
"""
17
DEFAULT_DEVICE :: Ref{Int}
18
19
-1-based index of default device to use, by default 1 (first available device).
+0-based index of default device to use, by default 0 (first available device).
20
21
-const DEFAULT_DEVICE = Ref{Int}(1)
+const DEFAULT_DEVICE = Ref{Int}(0)
22
23
function default_device(client::AbstractClient)
24
- return addressable_devices(client)[DEFAULT_DEVICE[]]
+ return addressable_devices(client)[DEFAULT_DEVICE[] + 1]
25
end
0 commit comments