-
Notifications
You must be signed in to change notification settings - Fork 21.2k
Description
Activity
KerfuffleV2 commented on Aug 26, 2023on Aug 26, 2023
Does setting HSA_OVERRIDE_GFX_VERSION=10.3.0 help?
env HSA_OVERRIDE_GFX_VERSION=10.3.0 ./main -ngl 1 -m /models/llama2_7b_chat_uncensored.gguf.q2_K.bin -p "write a poem"
grigio commented on Aug 26, 2023on Aug 26, 2023
@KerfuffleV2 No, always segfault
KerfuffleV2 commented on Aug 26, 2023on Aug 26, 2023
Some other things to possibly try:
- Running with
-lv(low vram option) - Running with
-nommq(turns off the custom matmul kernels) - Try with
-ngl 0but a long prompt (say 100+ tokens). This will test whether evaluating the prompt on the GPU works.
(These things aren't necessarily going to help you personally, but testing them may help narrow down the issue.)
It's also very likely that running evaluation on APU rather than the CPU is going to be slower. So even if you do get it working, you may not benefit from using it.
jwlarocque commented on Aug 27, 2023on Aug 27, 2023
I'm running into the same issue, running in Docker rocm/dev-ubuntu-22.04:5.5-complete with an RX 6600. I've tried the first two flags with no change in behavior.
Edit: forgot to say:
Running -ngl 0 with a long prompt also segfaults (short prompts run fine on CPU).
(In my case you only see the segfault message when running from bash, if you docker run main it exits silently. Also without the GFX version override it won't build at all, so that part seems to be working.)
What devices did you pass into docker, did you pass renderDxxx in and not card0? Also do you have amdgpu-dkms installed on host?
SlyEcho commented on Aug 30, 2023on Aug 30, 2023
VRAM Total Memory (B): 536870912
I think it's down to the small VRAM size (512MB). You can try to lower the context size and the batch size. Also using a small model like OpenLLaMA 3B.
I'm running into the same issue, running in Docker rocm/dev-ubuntu-22.04:5.5-complete with an RX 6600. I've tried the first two flags with no change in behavior.
The variable should be passed into the container with the -e switch:
docker run --rm -it \
-e HSA_OVERRIDE_GFX_VERSION=10.3.0 -v/models/:/models --device /dev/kfd --device /dev/dri \
llama.cpp:rocm --run \
-m /models/open-llama-7b-v2-q4_K_M.gguf -ngl 99 -n 320 -p HelloIt's possible you need to pass in the DRI devices separately on some container runtimes: --device /dev/kfd --device /dev/dri/card1 --device /dev/dri/renderD128.
It's also possible the RX 6600 is not supported...
maybe try ./models instead of /models ?
KerfuffleV2 commented on Oct 18, 2023on Oct 18, 2023
maybe try ./models instead of /models ?
That's not going to work unless the CWD is the root already, and any case it would just be the same.
They're mounting their models under /models with docker.
ekg commented on Dec 13, 2023on Dec 13, 2023
I believe the problem is that the AMD APUs require a different allocator to use the common RAM pool for VRAM. See ROCm/ROCm#2014 (comment), which points at https://github.com/pomoke/torch-apu-helper.
A potential solution would be to use hipHostMalloc(&ptr,size,0) for allocation when building ROCm compatibility.
ekg commented on Dec 13, 2023on Dec 13, 2023
I'll test an update the allocation patterns which exploit shared memory better. A problem is that these don't work on windows, so they'll have to be conditionally defined. https://rocmdocs.amd.com/projects/HIP/en/develop/user_guide/programming_manual.html
ROCm works in the docker container but if I try to offload a layer I get a segfault