* print timings on ctrl+c exit
* remove redundant free memory call.
* add global pointer to ctx.
#endif
static console_state con_st;
+static llama_context ** g_ctx;
static bool is_interacting = false;
if (!is_interacting) {
is_interacting=true;
} else {
+ llama_print_timings(*g_ctx);
_exit(130);
}
}
// params.prompt = R"(// this function checks if the number n is prime
//bool is_prime(int n) {)";
-
+
llama_context * ctx;
+ g_ctx = &ctx;
// load the model
{