Fix #292
Start of this edit. Would like to get some guidance on how to proceed...
Remarks:
- Checked with clang on Windows 11 for unused variables in release configuration
- There are probably some differences in debug and release configuration due to the usage of
assert - Can't check Accelerate
- Not sure if I'm able to test OpenCL
- Definitely can't test CUDA
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.
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 ne and nb to simplify.
Also, add an extra macro to unpack src0, src1 and dst all at once since this case is very commonly used
The changes in ggml.c look reasonable to me. Do you want me to touch other files of the code base, too?