lmdeploy icon indicating copy to clipboard operation
lmdeploy copied to clipboard

[Bug] AMD显卡运行出现错误

Open sunskyx opened this issue 2 months ago • 4 comments

Checklist

  • [x] 1. I have searched related issues but cannot get the expected help.
  • [x] 2. The bug has not been fixed in the latest version.
  • [x] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

root@ubuntu:/workspace/.cache/modelscope/hub/models/Qwen/Qwen3-0___6B# lmdeploy chat . 2025-10-03 08:00:59,565 - lmdeploy - WARNING - archs.py:49 - Fallback to pytorch engine because turbomind engine is not installed correctly. If you insist to use turbomind engine, you may need to reinstall lmdeploy from pypi or build from source and try again. 2025-10-03 08:01:03,375 - lmdeploy - WARNING - triton.py:24 - PytorchEngine has not been tested on triton>3.4.0. 2025-10-03 08:01:03,375 - lmdeploy - WARNING - transformers.py:22 - LMDeploy requires transformers version: [4.33.0 ~ 4.56.1], but found version: 4.56.2 2025-10-03 08:01:03,379 - lmdeploy - WARNING - model.py:58 - Device does not support bfloat16. Loading weights from safetensors: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.83it/s]

double enter to end input >>> 你是谁

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! double enter to end input >>>

Reproduction

感谢支持AMD显卡,之前都没机会测试

Environment

使用官方教程部署#The recommended way is to use the official ROCm PyTorch Docker image with pre-installed dependencies:
docker run -it \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    --device=/dev/kfd \
    --device=/dev/dri \
    --group-add video \
    --ipc=host \
    --network=host \
    --shm-size 32G \
    -v /root:/workspace \
    rocm/pytorch:latest


#Once inside the container, install LMDeploy with ROCm support:
LMDEPLOY_TARGET_DEVICE=rocm pip install  git+https://github.com/InternLM/lmdeploy.git

Error traceback


sunskyx avatar Oct 03 '25 08:10 sunskyx

显卡是7900xtx,系统是Ubuntu 24.04.3 LTS (GNU/Linux 6.14.0-33-generic x86_64)

sunskyx avatar Oct 03 '25 08:10 sunskyx

@sunskyx can you try this way? https://github.com/InternLM/lmdeploy/pull/3925#issuecomment-3252045525

Sadly we do not have a usable RoCM environment to test and solve it now.

@Vivicai1005 do you have any idea on it?

windreamer avatar Oct 10 '25 02:10 windreamer

Hi @sunskyx , 可以告知你的rocm版本吗?

Vivicai1005 avatar Oct 10 '25 06:10 Vivicai1005

@Vivicai1005 ROCm 6.4.4

sunskyx avatar Oct 10 '25 06:10 sunskyx