Skip to content

Commit 26a1438

Browse files
committed
Revert "Make DEFAULT_DEVICE 1-based"
This reverts commit 3bb3be9.
1 parent 3bb3be9 commit 26a1438

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-
1-based index of default device to use, by default 1 (first available device).
19+
0-based index of default device to use, by default 0 (first available device).
2020
"""
21-
const DEFAULT_DEVICE = Ref{Int}(1)
21+
const DEFAULT_DEVICE = Ref{Int}(0)
2222

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

0 commit comments

Comments
 (0)