Installation llama.cpp sous Windows 11 avec Ubuntu 22
-
Aie …
# /opt/rocm/bin/hipconfig --full Warning: HIP version file: "/opt/rocm-7.2.4/core-7.14/hip/share/hip/version" not found. Cannot give HIP version information. Warning: HIP version file: "/opt/rocm-7.2.4/core-7.14/hip/share/hip/version" not found. Cannot give HIP version information. HIP version: ==hipconfig HIP_PATH :/opt/rocm-7.2.4/core-7.14/hip ROCM_PATH :/opt/rocm-7.2.4/core-7.14 HIP_COMPILER :clang HIP_PLATFORM :amd HIP_RUNTIME :rocclr CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/opt/rocm-7.2.4/core-7.14/hip/include -I/include ==hip-clang HIP_CLANG_PATH :/opt/rocm-7.2.4/core-7.14/lib/llvm/bin AMD clang version 23.0.0git (https://github.com/ROCm/llvm-project.git 46fcb339fb61119b337f973c7ca9e710a319fdd0+PATCHED:440716f8b87be9d8e20ed910e10e5b6d14d57cf6) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/rocm-7.2.4/core-7.14/lib/llvm/bin sh: 1: /opt/rocm-7.2.4/core-7.14/lib/llvm/bin/llc: not found hip-clang-cxxflags : sh: 1: /opt/rocm-7.2.4/core-7.14/hip/bin/hipcc: not found hip-clang-ldflags : sh: 1: /opt/rocm-7.2.4/core-7.14/hip/bin/hipcc: not found == Environment Variables PATH =/opt/vulkan-sdk/x86_64/bin:/root/.nvm/versions/node/v26.3.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin LD_LIBRARY_PATH=/opt/vulkan-sdk/x86_64/lib/VulkanLoader/lib HIP_PATH=/opt/rocm-7.2.4/core-7.14/hip == Linux Kernel Hostname : pcremi Linux pcremi 6.18.33.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Fri Jun 5 01:12:21 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.4 LTS Release: 24.04 Codename: noble -
-
Lancement de docker :
# docker run -it --name=$(whoami)_llamacpp --privileged --network=host --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ipc=host --shm-size 16G -v $MODEL_PATH:/data rocm/dev-ubuntu-24.04:6.4-complete -
Il faut déplacer votre distribution Ubuntu WSL vers un autre disque …

-
Aie …
# llama-bench -m /models/qwen2.5-1.5b-instruct-q4_k_m.gguf llama-bench: error while loading shared libraries: libllama-bench-impl.so: cannot open shared object file: No such file or directoryPourtant pas de problème de compilation avec https://rocm.docs.amd.com/projects/llama-cpp/en/docs-25.08/install/llama-cpp-install.html
Cela ne fonctionne pas :
# ./build/bin/test-backend-ops ggml_cuda_init: failed to initialize ROCm: no ROCm-capable device is detected Testing 1 devices Backend 1/1: CPU Skipping CPU backend 1/1 backends passed OKAlors que j’ai fait le build pour toutes les architectures :
export LLAMACPP_ROCM_ARCH=gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102 -
J’essaye de déplacer …
PS C:\Windows\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu Running 2 PS C:\Windows\system32> wsl --terminate Ubuntu L’opération a réussi. PS C:\Windows\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu Stopped 2 PS C:\Windows\system32> wsl --manage Ubuntu --move D:\WSL\Ubuntu Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus. Code d'erreur : Wsl/Service/MoveDistro/ERROR_SHARING_VIOLATION PS C:\Windows\system32> wsl --manage Ubuntu --move D:\WSL\Ubuntu Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus. Code d'erreur : Wsl/Service/MoveDistro/ERROR_SHARING_VIOLATION -
Ouf …
PS C:\Windows\system32> wsl --shutdown PS C:\Windows\system32> wsl --manage Ubuntu --move D:\WSL\Ubuntu L’opération a réussi.
-
Nouveau build :
# export LLAMACPP_ROCM_ARCH=gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102 # HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \ cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=$LLAMACPP_ROCM_ARCH \ -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON \ && cmake --build build --config Release -j$(nproc) -
Je vais essayer la version Docker :
# export MODEL_PATH='/models/' # docker run --privileged --network=host --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ipc=host --shm-size 16G -v $MODEL_PATH:/data rocm/llama.cpp:llama.cpp-b5997_rocm6.4.0_ubuntu24.04_full -m /data/Qwen3.6-27B-Q4_K_M.gguf -p "Building a website can be done in 10 simple steps:" -n 512 --n-gpu-layers 999 Unable to find image 'rocm/llama.cpp:llama.cpp-b5997_rocm6.4.0_ubuntu24.04_full' locally llama.cpp-b5997_rocm6.4.0_ubuntu24.04_full: Pulling from rocm/llama.cpp 757fe5b21110: Downloading [==> ] 6.291MB/114.7MB 0f1832fb3fb1: Downloading [> ] 5.243MB/646.4MB 52ae0682347f: Downloading [======================================> ] 107MB/138.7MB b00fa23324d1: Pull complete -
Pas mieux :
root@pcremi:/workspace/llama.cpp/build/bin# pwd /workspace/llama.cpp/build/bin root@pcremi:/workspace/llama.cpp/build/bin# ./llama-bench -m /models/qwen2.5-1.5b-instruct-q4_k_m.gguf ggml_cuda_init: found 1 ROCm devices (Total VRAM: 16304 MiB): Device 0: AMD Radeon RX 9060 XT, gfx1200 (0x1200), VMM: no, Wave Size: 32, VRAM: 16304 MiB | model | size | params | backend | ngl | test | t/s | | ------------------------------ | ---------: | ---------: | ---------- | --: | --------------: | -------------------: | Segmentation fault (core dumped) -
Je fait un make install avant puis un nouveau test :
root@pcremi:/workspace/llama.cpp/build/bin# ./llama-bench -m /models/Qwen3.6-27B-Q4_K_M.gguf ggml_cuda_init: found 1 ROCm devices (Total VRAM: 16304 MiB): Device 0: AMD Radeon RX 9060 XT, gfx1200 (0x1200), VMM: no, Wave Size: 32, VRAM: 16304 MiB | model | size | params | backend | ngl | test | t/s | | ------------------------------ | ---------: | ---------: | ---------- | --: | --------------: | -------------------: | pid:3402 tid:0x757b61d04280 [CreateContext] fail 11 llama-bench: /home/remia/librocdxg/src/wddm/queue.cpp:267: wsl::thunk::ComputeQueue::ComputeQueue(wsl::thunk::WDDMDevice*, void*, uint64_t, std::atomic<long unsigned int>*, std::atomic<long unsigned int>*, volatile int64_t*, uint32_t, uint32_t, bool): Assertion `ret' failed. Aborted (core dumped)Pas mieux.
Bonjour ! Vous semblez intéressé par cette conversation, mais vous n’avez pas encore de compte.
Marre de refaire défiler les mêmes messages ? Créez un compte pour retrouver votre position, recevoir des notifications des nouvelles réponses, sauvegarder vos favoris et voter pour les messages que vous appréciez.
Grâce à votre participation, ce message peut devenir encore meilleur 💗
S'inscrire Se connecter