]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : fix compile warnings in llama_set_state_data()
authorGeorgi Gerganov <redacted>
Sat, 20 May 2023 07:14:31 +0000 (10:14 +0300)
committerGeorgi Gerganov <redacted>
Sat, 20 May 2023 07:14:43 +0000 (10:14 +0300)
llama.cpp
llama.h

index 6ebe85d0fed25033c69382ca30da36825a35d0ee..68e3bec1382ea72a3825eb318296c18bf09f5ac3 100644 (file)
--- a/llama.cpp
+++ b/llama.cpp
@@ -2618,8 +2618,8 @@ size_t llama_copy_state_data(struct llama_context * ctx, uint8_t * dst) {
 }
 
 // Sets the state reading from the specified source address
-size_t llama_set_state_data(struct llama_context * ctx, const uint8_t * src) {
-    const uint8_t * inp = src;
+size_t llama_set_state_data(struct llama_context * ctx, uint8_t * src) {
+    uint8_t * inp = src;
 
     // set rng
     {
diff --git a/llama.h b/llama.h
index fd3f21e5fa30a972f651ea98a33eff0694f2ee13..8623e08ce5a12cf4f199971b9a3045fc1873efeb 100644 (file)
--- a/llama.h
+++ b/llama.h
@@ -138,7 +138,7 @@ extern "C" {
 
     // Set the state reading from the specified address
     // Returns the number of bytes read
-    LLAMA_API size_t llama_set_state_data(struct llama_context * ctx, const uint8_t * src);
+    LLAMA_API size_t llama_set_state_data(struct llama_context * ctx, uint8_t * src);
 
     // Save/load session file
     LLAMA_API bool llama_load_session_file(struct llama_context * ctx, const char * path_session, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out);