Closed EdoaLive closed 1 month ago
While the rocblas.for.gfx90c.workable.7z
package (v0.5.7) from this GitHub
release with HSA_OVERRIDE_GFX_VERSION settings successfully addresses the 90c solution, a recurring issue
is the "llama runner process has terminated: exit status 0xc0000005" error across various machines.
This error likely stems from unknown local configurations or potential mishandling of libraries by Llama. Even using versions between 5.7 and 6.1.2 can trigger this issue.
Possible Solutions:
Debugging Recommendations:
Let me know if you have any further questions or need additional assistance. @EdoaLive
Hi
Awaiting Future Releases: Consider waiting for a future release that incorporates support for the 6.1.2 SDK. This update might resolve the issue directly.
I just tryed your new release of ollama-for-amd (0.3.8) and now it always says "no compatible GPUs were discovered". Tryed of course with 6.1.2 bundles (xnack- and normal). Also tryed HSA_OVERRIDE_GFX_VERSION. It never sees the GPU. BTW I noticed the path for rocblas.dll is changed, should the wiki be update with the new path? Or is it maybe a path issue?
Thanks. I'll also try older ollama-for-amd version in a bit
P.S. Maybe this issue should be moved to ollama-for-amd repo?
This question should be the issue for ollama-for-amd .anyway, you can still use this thread even it's not the ideal place for this question. The path should not be the problem. as long as you start server in ollama progarm folder , it should able to start.
Important Notes:
Steps:
Set HSA_OVERRIDE_GFX_VERSION="9.1.2"
in your terminal environment variables.Set HCC_AMDGPU_TARGET="gfx90c"
in your terminal environment variables.Set HCC_AMDGPU_TARGET="gfx90c:xnack-"
in your terminal environment variables../ollama serve
Troubleshooting:
Further Recommendations:
Remember that this setup is not officially supported by Ollama and may require further adjustments based on your specific arches.
Hope this method can help you if you haven't able to run on gpu. https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/issues/8#issuecomment-2344082165 @EdoaLive
Thanks @likelovewant for tagging me.
I tried to shuffle around the DLLs like #8 said, but I continue to get the same result "no compatible GPUs were discovered"
.
Then I tried like suggested there to run directly the runners\rocm_v6.1\ollama_llama_server.exe
and it said some DLLs were still missing, so I installed amd HIP 6.1 SDK to get those DLLs.
Now running directly in C:\Program Files\AMD\ROCm\6.1\bin
, after replacing rocblas.dll and library folder, the runner start but says rocBLAS error: Could not initialize Tensile host: No devices found
.
When runing ollama serve
in that dir, I get an additional error: source=amd_hip_windows.go:103 msg="AMD ROCm reports no devices found"
(BTW I updated to ollama-for-amd v0.3.10)
The HSA_OVERRIDE_GFX_VERSION
and HCC_AMDGPU_TARGET
seems to be ignored.
All this (not finding the GPU) started happening after switching to ROCm v6.1 which should give best result.
With older versions of ollama I think I have even less chances to get it work (?)
Edit: note: if I run amdgpu-arch.exe
I get this so I'm quite sure this is my GPU:
C:\Program Files\AMD\ROCm\6.1\bin>amdgpu-arch.exe
gfx90c:xnack-
rocBLAS error: Could not initialize Tensile host: No devices found.`` AMD ROCm reports no devices found
make sure get latest drivers
GPU Device Number : Run hipinfo
in your terminal to determine your GPU device number(s).
Environment Variable: Set the HIP_VISIBLE_DEVICES environment variable to specify which GPU(s) Ollama should use. For example: HIP_VISIBLE_DEVICES=0,1 (adjust the numbers based on your output from hipinfo).
if not show , try test it with 0,1 or 2.
This can be set by code Set HIP_VISIBLE_DEVICES=0,1
or Hard way as below .
Then run./ollama serve
or ./ollama_llama_server.exe
Also you may test set in enviroment as guide https://www.computerhope.com/issues/ch000549.htm creat a new line in system variables , set N: HSA_OVERRIDE_GFX_VERSION
and set V : 9.0.12
if all fails . you may test if the same method test works for previous version which support HipSDK 5.7 .eg v0.3.6 or earlier version.
Hope those infos can help you so far .
@EdoaLive
hipinfo also could not find the gpu device:
C:\Program Files\AMD\ROCm\6.1\bin>hipInfo.exe
checkHipErrors() HIP API error = 0100 "no ROCm-capable device is detected" from file <C:\constructicon\builds\gfx\eleven\24.10\drivers\compute\hip-tests\samples\1_Utils\hipInfo\hipInfo.cpp>, line 192.
Are you sure that the package for 90c:xnack- for 6.1.2 actually contains the driver and libraries for that architecture? The AMD GPU drivers I have installed are the latest.
For reference this is hipinfo.exe from HIP SDK 5.7:
C:\Program Files\AMD\ROCm\5.7\bin>hipInfo.exe
--------------------------------------------------------------------------------
device# 0
Name: AMD Radeon(TM) Graphics
pciBusID: 8
pciDeviceID: 0
pciDomainID: 0
multiProcessorCount: 6
maxThreadsPerMultiProcessor: 2560
isMultiGpuBoard: 0
clockRate: 1500 Mhz
memoryClockRate: 1333 Mhz
memoryBusWidth: 0
totalGlobalMem: 8.46 GB
totalConstMem: 2147483647
sharedMemPerBlock: 64.00 KB
canMapHostMemory: 1
regsPerBlock: 0
warpSize: 64
l2CacheSize: 4194304
computeMode: 0
maxThreadsPerBlock: 1024
maxThreadsDim.x: 1024
maxThreadsDim.y: 1024
maxThreadsDim.z: 1024
maxGridSize.x: 2147483647
maxGridSize.y: 65536
maxGridSize.z: 65536
major: 9
minor: 0
concurrentKernels: 1
cooperativeLaunch: 0
cooperativeMultiDeviceLaunch: 0
isIntegrated: 0
maxTexture1D: 16384
maxTexture2D.width: 16384
maxTexture2D.height: 16384
maxTexture3D.width: 2048
maxTexture3D.height: 2048
maxTexture3D.depth: 2048
isLargeBar: 0
asicRevision: 0
maxSharedMemoryPerMultiProcessor: 64.00 KB
clockInstructionRate: 1000.00 Mhz
arch.hasGlobalInt32Atomics: 1
arch.hasGlobalFloatAtomicExch: 1
arch.hasSharedInt32Atomics: 1
arch.hasSharedFloatAtomicExch: 1
arch.hasFloatAtomicAdd: 1
arch.hasGlobalInt64Atomics: 1
arch.hasSharedInt64Atomics: 1
arch.hasDoubles: 1
arch.hasWarpVote: 1
arch.hasWarpBallot: 1
arch.hasWarpShuffle: 1
arch.hasFunnelShift: 0
arch.hasThreadFenceSystem: 1
arch.hasSyncThreadsExt: 0
arch.hasSurfaceFuncs: 0
arch.has3dGrid: 1
arch.hasDynamicParallelism: 0
gcnArchName: gfx90c:xnack-
peers:
non-peers: device#0
memInfo.total: 8.46 GB
memInfo.free: 8.32 GB (98%)
This actually works even without rocblas.dll and library folder 🤔
hipinfo also could not find the gpu device:
C:\Program Files\AMD\ROCm\6.1\bin>hipInfo.exe checkHipErrors() HIP API error = 0100 "no ROCm-capable device is detected" from file <C:\constructicon\builds\gfx\eleven\24.10\drivers\compute\hip-tests\samples\1_Utils\hipInfo\hipInfo.cpp>, line 192.
Are you sure that the package for 90c:xnack- for 6.1.2 actually contains the driver and libraries for that architecture? The AMD GPU drivers I have installed are the latest.
There are similiar issue happens on 5.7 https://github.com/ROCm/ROCm/issues/2941 . even may not be the same situation. there could be a way to solve this . not know yet .
I have received feedbacks from others . this hipinfo not able detacted by windows and can be detacted by linux by tweaks some code. therefore I suggest test it by Set HIP_VISIBLE_DEVICES=0,1
. If both no work .
Then you probably need to debug it use previous ollama version which support 5.7 . Once you are able to make it works . you may build ollama from source as guide in wiki .
Alternatively , you may test others LLM Client , eg lmstudio.ai .recently add vulkan support and had most amd gpus support .
Hi @likelovewant, I ended up rebuilding everything on linux. Do you happen to have the file to replace for the rebulid of ROCm libraries for 6.1.2? Or they are the same I can find in the 5.7 release?
Also with the linux driver it (rocminfo) sees the gpu as xnack+. Is it possible to use xnack+ with ollama using the system ram instead of the small VRAM?
Thanks
The library is same both for linux and windows . however,there still need another libslibsrocblas.so
( name not correct ,something like this ), which is complex . if you need build it , you can find the logic file for building linux version rocblas.dll in logic file for gfx90c ,however it's not recommend . you may use export HSA_OVERRIDE_GFX_VERSION=9.0.0
to make it support . fake you gpu as gfx900 which is support by linux rocm .( try earliar rocm version before 6.2.0 as it drop support also ) ,you may also test for gf908 ( 9.0.8),gf1010 (10.1.0 )also .
if you want to build rocm library from source on linux , then you simply add 90c:xnack+ list with the logic file attached ,should able to build .
if you want to use system ram as your vram , you may test GTT as explained on https://github.com/ollama/ollama/pull/6282 @EdoaLive
I think this is related to #4 but I open a new issue because it seems something is changed after it. I'm using likelovewant/ollama-for-amd 0.3.6 I already tried various combination of the binaries in the 5.7 release but I get always the same result. I also tryed various HSA_OVERRIDE_GFX_VERSION whithout success (basing on suggestions from #4). Also tryed smaller models to see if it's a VRAM size problem, same result. If I undestand correctly, the Ryzen 4500U Pro I have is gfx90c (with xnack-? It depends on the driver?)
Can you help me get this running? Also maybe this is an ollama-for-amd issue?
Thanks
The log: