-
Notifications
You must be signed in to change notification settings - Fork 1.2k
cpu: fix compile errors on arm+msvc (windows) for pointer casts #1176
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
The runner on ggml-ci passes, but of course that doesn't run the arm+msvc scenario - 94cbdad |
The change looks OK to me - let's see how the CI in
I think the code that you referenced is executed on Arm without MSVC because of the |
The CI has passed. However, I took a more detailed look at this code now, and I think there is a simpler solutions: ggml-org/llama.cpp@1b07edf
Waiting for the |
Ah yeah, I missed that. You're right, and I agree with the suggestion, because In your WIP commit, are you missing a
|
And if |
The MSVC-specific hack for |
Right, but previously the |
Closing this in favor of #1177 |
This PR attempts to fix the CI build failure in ggml-org/llama.cpp#12732
The underlying arm functions actually expect
__fp16 *
, so this PR attempts to only match the expected function signature. E.g. ARM reference doc for vld1q_f16() and vst1_f16().It does not affect the actual computation. The computation (before this function is called) will still be performed as
uint16_t
on MSVC+arm neon. For e.g. the fp32-to-fp16 code will continue to pack the data in auint16_t
-ggml/src/ggml-impl.h
Lines 334 to 338 in dddef73
And the bitshifting hack from ggml-org/llama.cpp#5404 will continue being used (in ggml-cpu-quants.c) -
ggml/src/ggml-cpu/ggml-cpu-impl.h
Line 91 in dddef73
I don't think this will affect the runtime performance, since
reinterpret_cast
is compile-time.Given that I've never dealt with ARM code before, please let me know if this needs any changes. Thanks! :)