second-state / WasmEdge-WASINN-examples

Apache License 2.0
217 stars 35 forks source link

very slow and issues in nvidia jetson #112

Closed Links17 closed 2 months ago

Links17 commented 2 months ago

When I use nvidia Jetson AGX orin, cuda 8.7 to run LLaVA, he is very slow, it looks like it's not using the GPU but the CPU!

image

it'll take about 20s.

wasmedge --dir .:.   --env mmproj=mmproj-model-f16.gguf   --env image=monalisa.jpg   --env n-gpu-layers=35   --env threads=40   --nn-preload default:GGML:AUTO:ggml-model-q5_k.gguf   wasmedge-ggml-llava.wasm default
hydai commented 2 months ago

Hi @Links17 You should use n_gpu_layers instead.

See: https://github.com/second-state/WasmEdge-WASINN-examples/blob/master/wasmedge-ggml/llava/src/main.rs#L50

Links17 commented 2 months ago

Thanks a lot for the answer, it's my problem.