-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ggml : add macros for accessing tensors to reduce code duplication #292
Comments
Hi @ggerganov , I would like to work on this issue , as a way of bootstrapping and learning ggml. I have a PR where I have tried to address the issue. Please take a look at it and give me feedback and I will try to solve this in the best way possible. |
@GoWind: I have been thinking about this one, too. Maybe @ggerganov means something along the lines of
This should help to get rid of most duplication. Not sure what to do about
though. Open questions:
|
Yes - I was thinking something along those lines exactly.
Open to suggestions.
I dunno - as long as it's not super complicated :) Regarding the thread stuff: it might be part of #291 |
@ggerganov : possible simplification:
|
The non |
* [WIP] ref #292 * Further code reduction * ggml : minor style fixes * ggml : hide op locals in source file --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Now that #309 is merged: does it make sense if I adapt other accelerators without being able to test them (maybe I get OpenCL working)? Does CI cover enough of them? |
The CI does not cover it yet, but if you make the PR in the |
…) (ggerganov#330) * Check for reverse prompt by characters instead of tokens (ggerganov#292) * Update main.cpp Wording. * Cleanup. * Remove unnecessary use of std::stringstream. --------- Co-authored-by: Johnman <tjohnman@github> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
…) (ggerganov#330) * Check for reverse prompt by characters instead of tokens (ggerganov#292) * Update main.cpp Wording. * Cleanup. * Remove unnecessary use of std::stringstream. --------- Co-authored-by: Johnman <tjohnman@github> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
The following pattern is repeated extensively throughout
ggml.c
:It should be turned into macro(s) and while at it - we should fix all integer types. In the example above, the
nb
values are incorrectly being cast toint
instead ofsize_t
The text was updated successfully, but these errors were encountered: