diff --git a/ggml-cuda/acc.cu b/ggml-cuda/acc.cu index 96bfe1c9d8147..4362dffd46ccf 100644 --- a/ggml-cuda/acc.cu +++ b/ggml-cuda/acc.cu @@ -18,6 +18,8 @@ static __global__ void acc_f32(const float * x, const float * y, float * dst, co } } + + static void acc_f32_cuda(const float * x, const float * y, float * dst, const int n_elements, const int ne10, const int ne11, const int ne12, const int nb1, const int nb2, const int offset, cudaStream_t stream) { diff --git a/ggml.c b/ggml.c index c9b0a6a0ef776..8caab813624da 100644 --- a/ggml.c +++ b/ggml.c @@ -244,6 +244,8 @@ inline static void * ggml_malloc(size_t size) { GGML_PRINT("WARNING: Behavior may be unexpected when allocating 0 bytes for ggml_malloc!\n"); return NULL; } + + void * result = malloc(size); if (result == NULL) { GGML_PRINT("%s: failed to allocate %6.2f MB\n", __func__, size/(1024.0*1024.0));