Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asserting over nb[0] as type check causes issue for tensors after permuting #530

Open
cndn opened this issue Sep 19, 2023 · 1 comment
Open

Comments

@cndn
Copy link

cndn commented Sep 19, 2023

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!

@YavorGIvanov
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants