mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-05-09 20:13:14 +00:00
ggml : aligned malloc -> malloc
This commit is contained in:
parent
987f3145d0
commit
552419f2c0
@ -3836,11 +3836,7 @@ struct ggml_context * ggml_init(struct ggml_init_params params) {
|
|||||||
|
|
||||||
ggml_critical_section_end();
|
ggml_critical_section_end();
|
||||||
|
|
||||||
struct ggml_context * ctx = GGML_ALIGNED_MALLOC(sizeof(struct ggml_context));
|
struct ggml_context * ctx = GGML_MALLOC(sizeof(struct ggml_context));
|
||||||
if (ctx == NULL) {
|
|
||||||
GGML_LOG_ERROR("%s: failed to allocate ggml_context\n", __func__);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// allow to call ggml_init with 0 size
|
// allow to call ggml_init with 0 size
|
||||||
if (params.mem_size == 0) {
|
if (params.mem_size == 0) {
|
||||||
@ -3892,7 +3888,7 @@ void ggml_free(struct ggml_context * ctx) {
|
|||||||
GGML_ALIGNED_FREE(ctx->mem_buffer);
|
GGML_ALIGNED_FREE(ctx->mem_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
GGML_ALIGNED_FREE(ctx);
|
GGML_FREE(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ggml_used_mem(const struct ggml_context * ctx) {
|
size_t ggml_used_mem(const struct ggml_context * ctx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user