-
Notifications
You must be signed in to change notification settings - Fork 12k
ggml : reading the runtime sve config of the cpu #8709
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
Conversation
Won't this break SVE support in non-linux systems? |
Are there systems with arm+sve which run windows and llama.cpp? Well, windows' WSL layer seem to have |
I guess not, MSVC doesn't seem to support SVE either (there is no |
Other question is, how will this affect performance? If I am not mistaken this will add a system call before each dot product, which should have a significant overhead. |
The |
The value could be cached at startup. Add an |
Ok, compared to the old checkout which basically didnt run with sve512, the new one seems to be fine. But the performance is all over the place. The new fallback path seems to be neon in I guess that's an "artifact" of GNU, because as i commented on the other PR, some compilers might fix svcntb at compile time and we saw crashes in the svcntb checks even with the wrappers enabled. |
Thanks. Done that, and also unified the |
ggml/src/ggml-quants.h
Outdated
@@ -127,6 +127,10 @@ void iq2xs_free_impl(enum ggml_type type); | |||
void iq3xs_init_impl(int grid_size); | |||
void iq3xs_free_impl(int grid_size); | |||
|
|||
#if defined(__ARM_FEATURE_SVE) | |||
extern int sve_cnt_b; |
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.
I think it would be good to add a ggml_
prefix to this variable to avoid possible conflicts with 3rd party software.
extern int sve_cnt_b; | |
extern int ggml_sve_cnt_b; |
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.
ok, yes, that makes sense. i changed it according to your suggestion
* ggml : reading the runtime sve config of the cpu * change to one time init to prevent performance drop * prefix variable to avoid possible conflicts * revert xxhash fix and add brackets --------- Co-authored-by: domke <[email protected]>
@ggerganov here is a new version of the old #8382 since the code in question has moved from
ggml.c
toggml-quants.c
. i'll close the old PR.