-
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 : reduce code duplication with helper macros for local variables #309
Conversation
Not sure if @ggerganov agrees, but I think that the best way to do this may be a simple macro that has all the variables for the 3 tensors src0/src1/dst, with casts to void (like the UNUSED macro) to silence unused warnings. I trust in the compiler's ability to remove actually unused variables. No need to complicate it. |
Thanks, then I'd tend to add the UNUSED macro to GGML_DEFINE_LOCALS. |
Yes, what @slaren said - let's always unpack all 4 array elements of |
The changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - great change!
We can also apply similar simplification in the GPU backend code in other PRs
Start of this edit. Would like to get some guidance on how to proceed...
Remarks:
assert