From 0d34ea8c5efea6a8d40bc97f5b7511ce687d0b32 Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:23:58 -0300 Subject: [PATCH] Update LocalPreference strings --- .buildkite/pipeline.yml | 4 ++-- LocalPreferences.toml | 4 ++-- src/array.jl | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 254672495..eebfba141 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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" diff --git a/LocalPreferences.toml b/LocalPreferences.toml index 7f1c333c4..a2eaba4fc 100644 --- a/LocalPreferences.toml +++ b/LocalPreferences.toml @@ -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" diff --git a/src/array.jl b/src/array.jl index bee444cf1..7edf8cf47 100644 --- a/src/array.jl +++ b/src/array.jl @@ -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")