llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

a bit confused about this in function ggml_cl_mul_f32

Open gotope opened this issue 3 years ago • 4 comments

static void ggml_cl_mul_f32(const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst) { GGML_ASSERT(src1->backend == GGML_BACKEND_GPU); const int64_t ne00 = src0->ne[0]; const int64_t ne01 = src0->ne[1]; const int64_t ne02 = src0->ne[2]; const int64_t ne03 = src0->ne[2]; // is ne03 the same as ne02 ?

gotope avatar Jun 29 '23 16:06 gotope

Looks like a bug

ggerganov avatar Jul 01 '23 16:07 ggerganov

Yes, this is a bug that has never caused an issue cause we only use 2D matrices at the moment. You can make a PR to fix it or I'll do it eventually.

0cc4m avatar Jul 03 '23 08:07 0cc4m

@0cc4m, PR https://github.com/ggerganov/llama.cpp/pull/2088

gotope avatar Jul 03 '23 15:07 gotope

the PR is committed

howard0su avatar Jul 04 '23 01:07 howard0su