Skip to content

Commit

Permalink
Update LocalPreference strings
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Jul 22, 2024
1 parent 7c905f3 commit 0d34ea8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ steps:
matrix:
setup:
storage:
- "SharedStorage"
- "ManagedStorage"
- "shared"
- "managed"
commands: |
echo -e "[Metal]\ndefault_storage = \"{{matrix.storage}}\"" >LocalPreferences.toml
- label: "API validation"
Expand Down
4 changes: 2 additions & 2 deletions LocalPreferences.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Metal]
# which storage mode unspecified allocations should default to.
# possible values: "PrivateStorage", "SharedStorage", "ManagedStorage"
#default_storage = "PrivateStorage"
# possible values: "private", "shared", "managed"
#default_storage = "private"
8 changes: 4 additions & 4 deletions src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ See also `VecOrMat`(@ref) for examples.
const MtlVecOrMat{T,S} = Union{MtlVector{T,S},MtlMatrix{T,S}}

# default to private memory
const DefaultStorageMode = let str = @load_preference("default_storage", "PrivateStorage")
if str == "PrivateStorage"
const DefaultStorageMode = let str = @load_preference("default_storage", "private")
if str == "private"
PrivateStorage
elseif str == "SharedStorage"
elseif str == "shared"
SharedStorage
elseif str == "ManagedStorage"
elseif str == "managed"
ManagedStorage
else
error("unknown default storage mode: $default_storage")
Expand Down

0 comments on commit 0d34ea8

Please sign in to comment.