cpu: fix compile errors on arm+msvc (windows) for pointer casts#1176
cpu: fix compile errors on arm+msvc (windows) for pointer casts#1176cmdr2 wants to merge 1 commit intoggml-org:masterfrom
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_ton 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_castis compile-time.Given that I've never dealt with ARM code before, please let me know if this needs any changes. Thanks! :)