[Feature]: Allow specifying CUDA device in configure_cuda
还没有人认领这个 Issue。
- #306 来自 @be-student —— 已关闭,未合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
首先定位 configure_cuda 及其调用方,包括 setup_torch_device,并检查 torch 设备和 ONNX Runtime providers 的配置方式。添加可选的设备选择,同时保留默认行为,然后验证 PyTorch 和 ONNX Runtime 都使用所选的 GPU。
由索引模型根据 Issue 内容生成。
描述
Description
Hi,
I’m currently using the setup_torch_device and configure_cuda methods. Right now, configure_cuda always sets:
self.torch_device = torch.device("cuda")
which defaults to the first available GPU (cuda:0). On multi-GPU systems, the first GPU might already be in use, and it would be useful to allow selecting a specific GPU.
Proposed:
Add an optional argument to configure_cuda, e.g., device_index, so that the device can be explicitly set:
def configure_cuda(self, ort_providers, device_index=0):
self.torch_device = torch.device(f"cuda:{device_index}")
This would allow both PyTorch and ONNX Runtime to use the specified GPU, instead of always defaulting to cuda:0.
Thank you~
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 216
- 平均合并
- 1 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nomadkaraoke/python-audio-separator 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 68/100
nomadkaraoke/python-audio-separator#292 · 2 条评论 ·
-
Confusing info in README可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 65/100
nomadkaraoke/python-audio-separator#246 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
查看 nomadkaraoke/python-audio-separator 的全部 Issue
相似的 Issue
-
request_access
难度 1/5 1 小时以内 新手友好度 75/100
-
blocker bug
难度 2/5 1-3 小时 新手友好度 76/100
achisolomon/software-factory#305 ·
-
难度 2/5 1-3 小时 新手友好度 92/100
erkamyaman/rust-anything#963 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
commonmark/commonmark-spec#850 ·
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 78/100