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

Question about ggml-alloc assert in CPU ggml-backend version of Sam.cpp #561

Closed
YavorGIvanov opened this issue Oct 9, 2023 · 6 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@YavorGIvanov
Copy link
Collaborator

YavorGIvanov commented Oct 9, 2023

I started using the the ggml-backend API in Sam.cpp.
After this commit - 25ce18a I hit an assert in Debug. The reason is that the view in init_view(..) doesn't have a valid buffer as the view_src also doesn't. I disabled the assert in this case here -> YavorGIvanov@94a4c07 and everything works fine.

Does that point to an underlying problem in the Sam implementation or not ? (I know that potentially the CUDA version won't work, but currently SAM.cpp doesn't support CUDA)

@YavorGIvanov YavorGIvanov added the question Further information is requested label Oct 9, 2023
@slaren
Copy link
Collaborator

slaren commented Oct 9, 2023

It is a bug, it also affects llama.cpp. Your fix looks good.

@slaren
Copy link
Collaborator

slaren commented Oct 9, 2023

The reason I didn't catch it is that it only affects debug builds, and I didn't test that.

@ggerganov I think we never run llama.cpp with a debug build in the ggml-ci, beyond the basic tests. That would have caught this issue.

@YavorGIvanov
Copy link
Collaborator Author

Ok. Should I make a simple PR or you would address it as part of some other changes ?

@slaren
Copy link
Collaborator

slaren commented Oct 9, 2023

We should fix this as soon as possible, a PR would be great.

@YavorGIvanov
Copy link
Collaborator Author

#562

@ggerganov
Copy link
Owner

Thank you @YavorGIvanov

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

No branches or pull requests

3 participants