tjake / Jlama

Jlama is a modern LLM inference engine for Java
Apache License 2.0
656 stars 60 forks source link

In fedora39, got error when running './run-cli.sh download tjake/llama2-7b-chat-hf-jlama-Q4' #28

Closed wangfei304187 closed 3 months ago

wangfei304187 commented 5 months ago

[INFO] --- maven-antrun-plugin:1.8:run (write-version-properties) @ jlama-native --- [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks

main: [exec] Result: 128 [exec] Result: 128 [echo] Current commit: 0 on 1970-01-01 00:00:00 +0000 [mkdir] Created dir: /home/wf/share/Jlama-main/jlama-native/target/classes/META-INF [propertyfile] Creating new property file: /home/wf/share/Jlama-main/jlama-native/target/classes/META-INF/com.github.tjake.versions.properties [INFO] Executed tasks [INFO] [INFO] --- maven-antrun-plugin:1.8:run (build-native-lib) @ jlama-native --- [INFO] Executing tasks

main: [exec] mkdir -p /home/wf/share/Jlama-main/jlama-native/target/native-objs-only [exec] gcc -o /home/wf/share/Jlama-main/jlama-native/target/native-objs-only/vector_simd.o -c src/main/c/vector_simd.c -O3 -mavx512f -march=native -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable [exec] In file included from /usr/lib/gcc/x86_64-redhat-linux/13/include/immintrin.h:109, [exec] from src/main/c/vector_simd.c:5: [exec] /usr/lib/gcc/x86_64-redhat-linux/13/include/fmaintrin.h: 在函数(function) ‘dot_product_f32_q8_256’中: [exec] /usr/lib/gcc/x86_64-redhat-linux/13/include/fmaintrin.h:63:1: 错误(Error):inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch [exec] 63 | _mm256_fmadd_ps (m256 A, m256 B, m256 C) [exec] | ^~~~~~~ [exec] src/main/c/vector_simd.c:46:15: 附注:从此处调用 [exec] 46 | sum = _mm256_fmadd_ps(va, vb_scaled, sum); [exec] | ^~~~~~~~~~~ [exec] /usr/lib/gcc/x86_64-redhat-linux/13/include/fmaintrin.h:63:1: 错误(Error):inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch [exec] 63 | _mm256_fmadd_ps (m256 A, m256 B, m256 C) [exec] | ^~~~~~~ [exec] src/main/c/vector_simd.c:46:15: 附注:从此处调用 [exec] 46 | sum = _mm256_fmadd_ps(va, vb_scaled, sum); [exec] | ^~~~~~~~~~~ [exec] make: *** [Makefile:40:/home/wf/share/Jlama-main/jlama-native/target/native-objs-only/vector_simd.o] 错误(Error) 1 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Jlama Parent 0.2.0-SNAPSHOT: [INFO] [INFO] Jlama Parent ....................................... SUCCESS [ 1.204 s] [INFO] Jlama Core ......................................... SUCCESS [ 7.439 s] [INFO] Jlama Native ....................................... FAILURE [ 1.955 s] [INFO] Jlama Net .......................................... SKIPPED [INFO] Jlama Cli .......................................... SKIPPED [INFO] Jlama Tests ........................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.692 s [INFO] Finished at: 2024-06-04T09:04:18+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (build-native-lib) on project jlama-native: An Ant BuildException has occured: exec returned: 2 [ERROR] around Ant part ...... @ 4:71 in /home/wf/share/Jlama-main/jlama-native/target/antrun/build-main.xml [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :jlama-native

38leinaD commented 5 months ago

Have a check if you have gcc installed. at least for me it was missing and caused this error.

tjake commented 5 months ago

Could you post the output of cat /proc/cpuinfo ?