-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
ggml : fix loongson compile warnings #7537
Conversation
@junchao-loongson I've configured the
Could you suggest a fix for these? |
Hello.
The second argument of the __lasx_xvsrli_h instruction needs to be an immediate number, and this code relies on the compiler's -O2 optimization. I am going to specify the function here for O2 optimization.
Thank you very much for your work on building the loongarch architecture ci!
…-----原始邮件-----
发件人:"Georgi Gerganov" ***@***.***>
发送时间:2024-05-26 01:28:51 (星期日)
收件人: "ggerganov/llama.cpp" ***@***.***>
抄送: junchao-loongson ***@***.***>, Mention ***@***.***>
主题: Re: [ggerganov/llama.cpp] ggml : fix loongson compile warnings (PR #7537)
@junchao-loongson I've configured the loongson node to run ggml-ci. Currently, there are a few build errors:
https://github.com/ggml-org/ci/blob/results/llama.cpp/80/787c2a26c54998fff5f621e5aa7ae9866d0bfd/ggml-101-loongson/stdall
In file included from /home/loongson/work/llama.cpp/ggml-impl.h:464,
from /home/loongson/work/llama.cpp/ggml-quants.c:5:
/home/loongson/work/llama.cpp/ggml-quants.c: In function ‘ggml_vec_dot_q3_K_q8_K’:
/home/loongson/work/llama.cpp/ggml-quants.c:6841:90: error: invalid argument to built-in function
const __m256i q3h_0 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6841:35: error: invalid argument to built-in function
const __m256i q3h_0 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6845:90: error: invalid argument to built-in function
const __m256i q3h_1 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6845:35: error: invalid argument to built-in function
const __m256i q3h_1 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6849:90: error: invalid argument to built-in function
const __m256i q3h_2 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6849:35: error: invalid argument to built-in function
const __m256i q3h_2 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6853:90: error: invalid argument to built-in function
const __m256i q3h_3 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:6853:35: error: invalid argument to built-in function
const __m256i q3h_3 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvandn_v(hbits, __lasx_xvslli_h(mone, bit)), bit), 2);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c: In function ‘ggml_vec_dot_q5_K_q8_K’:
/home/loongson/work/llama.cpp/ggml-quants.c:8051:35: error: invalid argument to built-in function
const __m256i q5h_0 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvand_v(hbits, hmask), bit++), 4);
^~~~~~~~~~~~~~~
/home/loongson/work/llama.cpp/ggml-quants.c:8056:35: error: invalid argument to built-in function
const __m256i q5h_1 = __lasx_xvslli_h(__lasx_xvsrli_h(__lasx_xvand_v(hbits, hmask), bit++), 4);
^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ggml.dir/build.make:118:CMakeFiles/ggml.dir/ggml-quants.c.o] 错误 1
make[2]: *** 正在等待未完成的任务....
make[1]: *** [CMakeFiles/Makefile2:820:CMakeFiles/ggml.dir/all] 错误 2
make: *** [Makefile:146:all] 错误 2
Could you suggest a fix for these?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello~ @ggerganov Using cmake DCMAKE-BUILD-TYPE=Debug Compilation passed |
@junchao-loongson Thanks. There are some connection issues from this node - I just sent you an e-mail. PTAL |
In the first PR, I made a mistake when doing the rebase code that caused the unit test to fail |
Fix unexpected error introduced during rebase code.
Adding a
ggml-101-loongson
node toggml-ci
- still some compile warnings left to fix