airockchip / rknn-llm

Other
320 stars 29 forks source link

编译内核时报错 #6

Open sdrzmgy opened 5 months ago

sdrzmgy commented 5 months ago

按文档中流程将 rknpu 驱动代码覆盖到当前内核代码目录,在编译(make -j10)的时候报错: CALL scripts/atomic/check-atomics.sh CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC drivers/rknpu/rknpu_gem.o drivers/rknpu/rknpu_gem.c: In function 'rknpu_gem_mmap_pages': drivers/rknpu/rknpu_gem.c:891:9: error: implicit declaration of function 'vm_flags_set' [-Werror=implicit-function-declaration] 891 | vm_flags_set(vma, VM_MIXEDMAP); | ^~~~ drivers/rknpu/rknpu_gem.c: In function 'rknpu_gem_mmap_buffer': drivers/rknpu/rknpu_gem.c:988:9: error: implicit declaration of function 'vm_flags_clear' [-Werror=implicit-function-declaration] 988 | vm_flags_clear(vma, VM_PFNMAP); | ^~~~~~ cc1: all warnings being treated as errors make[2]: [scripts/Makefile.build:273: drivers/rknpu/rknpu_gem.o] Error 1 make[1]: [scripts/Makefile.build:516: drivers/rknpu] Error 2 make[1]: Waiting for unfinished jobs.... make: [Makefile:1929: drivers] Error 2 make: *** Waiting for unfinished jobs....

noah003 commented 5 months ago

the same error

happyme531 commented 5 months ago

Workaround: https://github.com/ggerganov/llama.cpp/issues/722#issuecomment-2017885272

sdrzmgy commented 5 months ago

Workaround: ggerganov/llama.cpp#722 (comment)

I have tried this, but llama.cpp cannot run on rknpu which i think will be much faster than on CPU or mali-g610 GPU.