llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Misc. bug: RISCV output bug when using rvv with vlen > 256bit

Open grigohas opened this issue 1 year ago • 3 comments

Name and Version

./llama-cli latest version ubuntu linux riscv

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-cli

Problem description & steps to reproduce

The generated output of llama-cli in riscv env with rvv enabled consists of trash when vlen is greater than 256bits

First Bad Commit

No response

Relevant log output

No response

grigohas avatar Jan 02 '25 09:01 grigohas

Hello, I am a beginner and would like to ask what does the parameter "vlen" mean? I recently tested turning on RVV and the text generation result was the same as what you encountered. The results are as follows:

Image

JocelynPanPan avatar Jan 21 '25 08:01 JocelynPanPan

Hello, I am a beginner and would like to ask what does the parameter "vlen" mean? I recently tested turning on RVV and the text generation result was the same as what you encountered. The results are as follows:

Image

Hello, vlen is the vector register width. You can check this pull https://github.com/ggerganov/llama.cpp/pull/3453 where the developer told me that this might be a bug.

grigohas avatar Jan 22 '25 08:01 grigohas

OK, thanks for your reply!

JocelynPanPan avatar Jan 22 '25 11:01 JocelynPanPan

Hello,

Have this issue resolved now? or do we have any workaround?

BTW, it seems that vlen > 256bits is not a necessary condition for this issue. In my RISCV ISA simulator and a silicon with vlen=128bits, the output tokens are broken.

op21beyond avatar Mar 01 '25 13:03 op21beyond

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Apr 16 '25 01:04 github-actions[bot]