From: Georgi Gerganov Date: Sun, 11 Dec 2022 18:34:04 +0000 (+0200) Subject: talk : make compatible with c++11 (part 2) X-Git-Tag: upstream/1.7.4~1729 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=aa6adda26e1ee9843dddb013890e3312bee52cfe;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp talk : make compatible with c++11 (part 2) --- diff --git a/examples/talk.wasm/gpt-2.cpp b/examples/talk.wasm/gpt-2.cpp index 3cdc2c2e..bc5e099b 100644 --- a/examples/talk.wasm/gpt-2.cpp +++ b/examples/talk.wasm/gpt-2.cpp @@ -533,7 +533,9 @@ bool gpt2_eval( params.mem_buffer = buf; struct ggml_context * ctx0 = ggml_init(params); - struct ggml_cgraph gf = { .n_threads = n_threads }; + + struct ggml_cgraph gf = { }; + gf.n_threads = n_threads; struct ggml_tensor * embd = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, N); memcpy(embd->data, embd_inp.data(), N*ggml_element_size(embd)); diff --git a/examples/talk/gpt-2.cpp b/examples/talk/gpt-2.cpp index 6ef24962..3c04a9cb 100644 --- a/examples/talk/gpt-2.cpp +++ b/examples/talk/gpt-2.cpp @@ -533,7 +533,9 @@ bool gpt2_eval( params.mem_buffer = buf; struct ggml_context * ctx0 = ggml_init(params); - struct ggml_cgraph gf = { .n_threads = n_threads }; + + struct ggml_cgraph gf = { }; + gf.n_threads = n_threads; struct ggml_tensor * embd = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, N); memcpy(embd->data, embd_inp.data(), N*ggml_element_size(embd));