ggerganov / ggml

Tensor library for machine learning
MIT License
11.22k stars 1.04k forks source link

bug: `GGML_MAX_N_THREADS` undefined if `GGML_MAX_NAME` is defined #968

Closed Green-Sky closed 1 month ago

Green-Sky commented 1 month ago

Trying to compile sd.cpp with the new ggml fails because GGML_MAX_N_THREADS is not defined.

Looking at the following code, I think it gets pretty obvious why:

https://github.com/ggerganov/ggml/blob/336c10a4c3c8ec99af484b25a0cddd397a09cdb2/include/ggml.h#L232-L236

GGML_MAX_N_THREADS should be moved out of the #if and that section should be better formatted generally.

The recent c584042ed3a492cd0fd132f65869075d7165ff8f is the culprit.

ggerganov commented 1 month ago

Thanks - will push a fix in a bit