From acbab12a890ad298afce0a76aa2f2dcb30e2c390 Mon Sep 17 00:00:00 2001 From: Arik Poznanski Date: Thu, 13 Apr 2023 12:37:05 +0300 Subject: [PATCH] replaced use of auto with exact type to avoid using -std=c++14 --- llama.cpp | 8 ++++---- tests/test-tokenizer-0.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llama.cpp b/llama.cpp index 0a7217bed..2b3756160 100644 --- a/llama.cpp +++ b/llama.cpp @@ -42,7 +42,7 @@ static const size_t MB = 1024*1024; // TODO: dynamically determine these sizes // needs modifications in ggml -auto& MEM_REQ_SCRATCH0() +std::map& MEM_REQ_SCRATCH0() { static std::map _MEM_REQ_SCRATCH0 = { { MODEL_7B, 512ull * MB }, @@ -53,7 +53,7 @@ auto& MEM_REQ_SCRATCH0() return _MEM_REQ_SCRATCH0; } -auto& MEM_REQ_SCRATCH1() +std::map& MEM_REQ_SCRATCH1() { static std::map _MEM_REQ_SCRATCH1 = { { MODEL_7B, 512ull * MB }, @@ -65,7 +65,7 @@ auto& MEM_REQ_SCRATCH1() }; // 2*n_embd*n_ctx*n_layer*sizeof(float16) -auto& MEM_REQ_KV_SELF() +std::map& MEM_REQ_KV_SELF() { static std::map _MEM_REQ_KV_SELF = { { MODEL_7B, 1026ull * MB }, @@ -78,7 +78,7 @@ auto& MEM_REQ_KV_SELF() // this is mostly needed for temporary mul_mat buffers to dequantize the data // not actually needed if BLAS is disabled -auto& MEM_REQ_EVAL() +std::map& MEM_REQ_EVAL() { static std::map _MEM_REQ_EVAL = { { MODEL_7B, 768ull * MB }, diff --git a/tests/test-tokenizer-0.cpp b/tests/test-tokenizer-0.cpp index bfc540e75..59350e2fe 100644 --- a/tests/test-tokenizer-0.cpp +++ b/tests/test-tokenizer-0.cpp @@ -5,7 +5,7 @@ #include #include -auto& k_tests() +std::map>& k_tests() { static std::map> _k_tests = { { "Hello World", { 1, 10994, 2787, }, },