在运行任何使用嵌入式llminfo/vllm-rocm:vllm-v0.2.4镜像和rocm5.7(rhel 8.7)的模型时出现RuntimeError,

gzjq41n4  于 2个月前  发布在  其他
关注(0)|答案(5)|浏览(38)

这段代码是使用OpenAI的LLM(大型语言模型)库,通过VLLMB(可扩展低内存LLM)技术在低内存环境下训练和运行大型语言模型。代码首先导入了所需的库,然后定义了一些提示文本,接着设置了采样参数。之后,初始化了一个LLM引擎,并加载了预训练的模型。最后,代码尝试使用LLM生成一些文本,但在执行过程中出现了错误。

free_gpu_memory, total_gpu_memory = torch.cuda.mem_get_info()
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/cuda/memory.py", line 618, in mem_get_info
 return torch.cuda.cudart().cudaMemGetInfo(device)
RuntimeError: HIP error: invalid argument
HIP kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing HIP_LAUNCH_BLOCKING=1.
Compile with  `TORCH_USE_HIP_DSA`  to enable device-side assertions.

**System config:**

hostnamectl
Operating System: Red Hat Enterprise Linux 8.7 (Ootpa)
Kernel: Linux 4.18.0-425.3.1.el8.x86_64
Architecture: x86-64
rocm driver 5.7.0

**amd driver: 5.7.0**
**vllm container version: embeddedllminfo/vllm-rocm vllm-v0.2.4**
**RHEL8.7**
**GPU:MI210**

Also same config with RHEL8.8, It is working, But with 8.7 it is not working.
ecbunoof

ecbunoof1#

同一个GPU上出现同样的问题...有任何进展吗?

egmofgnx

egmofgnx2#

从日志中可以看出,这是一个关于初始化一个基于 NVIDIA 的 LLM 引擎的配置过程。在这个过程中,程序会尝试加载 COMGR 库,然后根据设备信息选择合适的 GPU 代理。接下来,程序会获取设备属性,如 Gfx Major/Minor/Stepping 等,并检查是否支持 Direct host access。最后,程序会获取设备数量和设备状态。整个过程中,大部分操作都是成功的,但在获取设备数量时出现了重复的错误。
从错误日志来看,问题出在torch.cuda.mem_get_info()这一行。这个错误可能是由于ROCm版本与PyTorch版本不兼容导致的。你可以尝试降级PyTorch版本或者升级ROCm版本来解决这个问题。

首先,你可以尝试降级PyTorch版本。在你的虚拟环境中运行以下命令:

pip install torch==1.8.0+cu102 -f https://download.pytorch.org/whl/cu102/torch_stable.html

然后重新运行你的代码,看看问题是否解决。

如果问题仍然存在,你可以尝试升级ROCm版本。在你的虚拟环境中运行以下命令:

conda update rocm

然后重新安装ROCm和VLLVM库:

conda install -c rapidsai -c nvidia rocm=4.5.0 llvm=11.0.0 vllm=0.3.2

最后,重新运行你的代码,看看问题是否解决。

jdgnovmf

jdgnovmf3#

问题是否已解决?

bjg7j2ky

bjg7j2ky4#

问题是否已解决?

x6yk4ghg

x6yk4ghg5#

相同的问题出现在同一个GPU上。

相关问题