ggml
ggml copied to clipboard
Asserting over nb[0] as type check causes issue for tensors after permuting
Is the intention of asserts like https://github.com/ggerganov/ggml/blob/master/src/ggml.c#L8772 to type check? I have a fp32 tensor as a result of permutation function, so nb[0] is no longer sizeof(float) and triggers the issue here.
Replacing with "GGML_ASSERT(src1->type == GGML_TYPE_F32);" works perfectly, but just checking if there are other purposes for this check. Thanks!
This function seems to assume that the src0 is contigous, so you can do ggml_cont(..) on the first argument of the add you do.