Mozilla-Ocho / llamafile

Distribute and run LLMs with a single file.
https://llamafile.ai
Other
16.75k stars 830 forks source link

Windows 10 GPU support bug #440

Open jeaneric opened 1 month ago

jeaneric commented 1 month ago

I have two almost identical computer (hardware), with the same GPU: RTX 4000

On one computer(# 1) I got this message right at the begining:

import_cuda_impl: initializing gpu module...
/U//.llamafile/: No such file or directory
{"function":"server_params_parse","level":"WARN","line":2424,"msg":"Not compiled with GPU offload support, --n-gpu-layers option will be ignored. See main README.md for information on enabling GPU BLAS support","n_gpu_layers":-1,"tid":"11165056","timestamp":1716595002}
warning: --n-gpu-layers 2147483647 was passed but no GPUs were found; falling back to CPU inference

On the other(# 2), all is normal and I get:

import_cuda_impl: initializing gpu module...
get_rocm_bin_path: note: amdclang++.exe not found on $PATH
get_rocm_bin_path: note: $HIP_PATH/bin/amdclang++.exe does not exist
get_rocm_bin_path: note: /opt/rocm/bin/amdclang++.exe does not exist
get_rocm_bin_path: note: clang++.exe not found on $PATH
get_rocm_bin_path: note: $HIP_PATH/bin/clang++.exe does not exist
get_rocm_bin_path: note: /opt/rocm/bin/clang++.exe does not exist
link_cuda_dso: note: dynamically linking /C/Users/BaribeauJE/.llamafile/ggml-rocm.dll
link_cuda_dso: warning: library not found: failed to load library
link_cuda_dso: note: dynamically linking /C/Users/BaribeauJE/.llamafile/ggml-cuda.dll
ggml_cuda_link: welcome to CUDA SDK with tinyBLAS
link_cuda_dso: GPU support loaded

I have tested 2 models and the results is the same. I always use the "-ngl 9999" param, and it's the only param. The two have the Nvidia drivers installed and even the CUDA SDK, because at first I tought this was the bug. # 2 had the CUDA SDK before those tests.

What's the problem with the # 1 that cannot use the GPU?

Thanks,

jart commented 1 month ago

Regarding /U//.llamafile/: No such file or directory maybe try running the program from your C:\ drive. It might also help to check if HOME or USER is defined in your environment variables. I'm not sure why it would print that.

jeaneric commented 1 month ago

I looked at those variables, and they are not present on any of the 2 computers. So should not be the problem. I already execute the program from the C:\ drive, I first tested from an USB drive, but it was the same bug. I have python TensorFlow processing that use the GPU ok on the 2 computers, so should not be a bug with the GPU.