Skip to content

Commit 3bb3be9

Browse files
committed
Make DEFAULT_DEVICE 1-based
1 parent 541087e commit 3bb3be9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xla/Client.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ function platform_name end
1616
"""
1717
DEFAULT_DEVICE :: Ref{Int}
1818
19-
0-based index of default device to use, by default 0 (first available device).
19+
1-based index of default device to use, by default 1 (first available device).
2020
"""
21-
const DEFAULT_DEVICE = Ref{Int}(0)
21+
const DEFAULT_DEVICE = Ref{Int}(1)
2222

2323
function default_device(client::AbstractClient)
24-
return addressable_devices(client)[DEFAULT_DEVICE[] + 1]
24+
return addressable_devices(client)[DEFAULT_DEVICE[]]
2525
end

0 commit comments

Comments
 (0)