examples : fix build + compile warnings (close #1256)

This commit is contained in:
Georgi Gerganov
2023-09-07 12:33:12 +03:00
parent aed5d40607
commit 2818de21ff
7 changed files with 29 additions and 24 deletions

View File

@ -191,9 +191,9 @@ bool gpt2_model_load(const std::string & fname, gpt2_model & model, gpt_vocab &
// create the ggml context
{
struct ggml_init_params params = {
.mem_size = ctx_size,
.mem_buffer = NULL,
.no_alloc = false,
/*.mem_size =*/ ctx_size,
/*.mem_buffer =*/ NULL,
/*.no_alloc =*/ false,
};
model.ctx = ggml_init(params);