[GH-ISSUE #1502] 有两张显卡,模型默认运行在 cuda 0,怎么修改运行到另一张卡 cuda 1 上? #1003

Open
opened 2026-10-29 14:47:23 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @corengh on GitHub (Sep 13, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1502

CPU:INTEL XEON PLATINUM 8582C 2.6GHZ 60核
内存:DDR5-5600 32G × 8
显卡:NVIDIA GeForce RTX 3090 24G × 2
系统:Ubuntu 24.04
KTranformers 版本:0.3.2
加载模型:DeepSeek-R1-UD-IQ1_S(140.23G)

有两张显卡,启动服务后默认运行在 cuda 0,想要将它修改到 cuda 1 上。

尝试将 DeepSeek-V3-Chat-serve.yaml 文件中关于 cuda 的设置都修改成了 cuda 1,但是加载的时候显示还是有小部分内容在 cuda 0 上,以致于最后没有运行成功。

想请教下如何解决?

Originally created by @corengh on GitHub (Sep 13, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1502 CPU:INTEL XEON PLATINUM 8582C 2.6GHZ 60核 内存:DDR5-5600 32G × 8 显卡:NVIDIA GeForce RTX 3090 24G × 2 系统:Ubuntu 24.04 KTranformers 版本:0.3.2 加载模型:DeepSeek-R1-UD-IQ1_S(140.23G) 有两张显卡,启动服务后默认运行在 cuda 0,想要将它修改到 cuda 1 上。 尝试将 `DeepSeek-V3-Chat-serve.yaml` 文件中关于 cuda 的设置都修改成了 cuda 1,但是加载的时候显示还是有小部分内容在 cuda 0 上,以致于最后没有运行成功。 想请教下如何解决?
Author
Owner

@ZelinMa557 commented on GitHub (Sep 17, 2025):

可以用cuda visible device环境变量设置吧,让进程只能看到cuda 1

<!-- gh-comment-id:3301089938 --> @ZelinMa557 commented on GitHub (Sep 17, 2025): 可以用cuda visible device环境变量设置吧,让进程只能看到cuda 1
Author
Owner

@corengh commented on GitHub (Oct 9, 2025):

可以用cuda visible device环境变量设置吧,让进程只能看到cuda 1

好使的,多谢

<!-- gh-comment-id:3384779020 --> @corengh commented on GitHub (Oct 9, 2025): > 可以用cuda visible device环境变量设置吧,让进程只能看到cuda 1 好使的,多谢
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#1003
No description provided.