mit-han-lab / TinyChatEngine

TinyChatEngine: On-Device LLM Inference Library
https://mit-han-lab.github.io/TinyChatEngine/
MIT License
756 stars 73 forks source link

Unable to deploy models in Android #101

Closed sqzhang-jeremy closed 7 months ago

sqzhang-jeremy commented 7 months ago

Hi team,

Thanks for your amazing work.

I met a problem while deploying models in my Google Pixel 8 Pro(ARM).

`../kernels/neon/matmul_neon_fp32.cc:6:10: fatal error: Accelerate/Accelerate.h: No such file or directory

6 | #include <Accelerate/Accelerate.h>

| ^~~~~~~~~

compilation terminated.

make: *** [Makefile:181: build/transformer/../kernels/neon/matmul_neon_fp32.o] Error 1

make: *** Waiting for unfinished jobs....

../kernels/neon/matmul_neon_int8_int4.cc:7:10: fatal error: Accelerate/Accelerate.h: No such file or directory

7 | #include <Accelerate/Accelerate.h>

| ^~~~~~~~~

compilation terminated.

make: *** [Makefile:181: build/transformer/../kernels/neon/matmul_neon_int8_int4.o] Error 1

src/ops/Gelu.cc: In function ‘float Gelu_imp(float)’:

src/ops/Gelu.cc:10:31: error: ‘tanhf’ was not declared in this scope

10 | return 0.5f x (1.0f + tanhf(SQRT_2_OVER_PI x (1.0f + GELU_COEF_A x x)));

| ^~~~~

src/ops/Gelu.cc: In function ‘float Gelu_quick_imp(float)’:

src/ops/Gelu.cc:20:32: error: ‘expf’ was not declared in this scope

20 | return x (1.0f / (1.0f + expf(GELU_QUICK_COEF x)));

| ^~~~

make: *** [Makefile:181: build/transformer/src/ops/Gelu.o] Error 1`

Could you help me fix the bugs? Thanks

Cheers, Jeremy

sqzhang-jeremy commented 7 months ago
sqzhang-jeremy commented 7 months ago

Thank you. Bugs was fixed through the latest version.

TinyChatEngine