LLMUnity icon indicating copy to clipboard operation
LLMUnity copied to clipboard

Tried architecture: cuda-cu12.2.0, error: LLM 11: Severe error occured

Open Kholuugame opened this issue 6 months ago • 2 comments

Describe the bug

Tried architecture: cuda-cu12.2.0, error: LLM 11: Severe error occured UnityEngine.Debug:Log (object) LLMUnity.LLMUnitySetup:Log (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLMUnitySetup.cs:188) LLMUnity.LLM:StartLLMServer (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:508) LLMUnity.LLM/<>c__DisplayClass56_0:<Awake>b__0 () (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:145) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Using architecture: hip UnityEngine.Debug:Log (object) LLMUnity.LLMUnitySetup:Log (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLMUnitySetup.cs:188) LLMUnity.LLM:StartLLMServer (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:492) LLMUnity.LLM/<>c__DisplayClass56_0:<Awake>b__0 () (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:145) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

LLM service created UnityEngine.Debug:Log (object) LLMUnity.LLMUnitySetup:Log (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLMUnitySetup.cs:188) LLMUnity.LLM:StartLLMServer (string) (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:517) LLMUnity.LLM/<>c__DisplayClass56_0:<Awake>b__0 () (at ./Library/PackageCache/ai.undream.llm/Runtime/LLM.cs:145) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Why cuda failed to load? I have cuda 12.2.r12.2 installed and was able to run llm on llama.cpp with cuda. But it failed to run in Unity why is that?

Steps to reproduce

  1. Run Unity on compatible cuda GPU
  2. Install undreamai-v1.2.6-llamacpp
  3. Open chat example scene
  4. Set GPU layer to 1 or more
  5. Play Expect: Failed to load Cuda and fallback to using Hip If not then something missing on my end.

LLMUnity version

Unity 6

Operating System

Windows

Kholuugame avatar Jul 10 '25 12:07 Kholuugame

hi! what GPU do you have? Can you try after restarting Unity and setting the GPU layers to 1? Can you also send me the command shown in the Unity debug messages starting with "Deploy server command"?

amakropoulos avatar Jul 10 '25 17:07 amakropoulos

Deploy server command: undreamai_server.exe -m "C:/Development/Unity Project/LLM/Assets/StreamingAssets/LLModels/Qwen3-1.7B-Q4_K_M.gguf" -c 4096 -b 2 --log-disable -np 1 -ngl 1 --template "qwen3"

I'm using an old GPU 940MX Why when I switching the Unity editor to Vulkan it still trying to load cuda then fallback to hip instead of using vulkan?

Kholuugame avatar Jul 11 '25 20:07 Kholuugame