Idiomatic multi-gpu usage
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python, pytorch
研究方向
該 issue 沒有指出任何 repository 檔案或測試。首先重現所示的 PyTorch、CuPy 與 nvImageCodec multi-GPU 程式碼片段,接著檢查 Encoder 如何選擇裝置。完成標準是提供一條有文件說明且可正常運作的使用路徑,讓張量保持在預期的 GPU 上,並避免回報的 core dump。
由索引模型根據 Issue 內容生成。
描述
Describe the question.
I'm trying to utilize this library in multi-gpu torch settings and so far I'm getting no luck with frequent core dumped error, that doesn't tell me much.
my current approach is this (LLM generated):
dev_idx = _torch.cuda.current_device() if _torch.cuda.is_available() else 0
with cp.cuda.Device(dev_idx):
encoder = nvimgcodec.Encoder()
output_path = frame_dir / f"{to_stem(name)}.tiff"
gpu_arr = cp.asarray(result.cpu())
encoder.write(str(output_path), gpu_arr)
# Release GPU memory retained by CuPy's pool to avoid OOM across concurrent saves
try:
cp.get_default_memory_pool().free_all_blocks()
except Exception:
pass
from nvidia-smi I see that most of the memory is being allocated on GPU 0 and it feels like nvImageEncoder is not explicitly aware of what GPU it is expected to run on. Can you provide example on how to utilize it and keep tensors on GPU?
Check for duplicates
- I have searched the open bugs/issues and have found no duplicates for this bug report
- 主要語言
- Jupyter Notebook
- 星號
- 164
- 分支
- 26
- 平均合併
- 27 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/nvImageCodec 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 79/100
NVIDIA/nvImageCodec#65 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 72/100
NVIDIA/nvImageCodec#66 · 1 則留言 ·
-
難度 5/5 一週以上 新手友好度 38/100
NVIDIA/nvImageCodec#64 ·
-
nvjpeg2k error 3 (Bad jpeg) on valid JPEG 2000 aerial photos that OpenJPEG and ffmpeg decode identically可能已有人在做 @mkepa-nv 於 6 天前認領。 未關閉bug
NVIDIA/nvImageCodec#63 · 2 則留言 · 已指派 1 人 ·
-
難度 5/5 一週以上 新手友好度 8/100
NVIDIA/nvImageCodec#60 ·
查看 NVIDIA/nvImageCodec 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
Stirling-Tools/Stirling-PDF#8875 · 1 個 reaction ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
COCO crowd annotations (iscrowd=1) are counted as ground truth, lowering detection recall and AP未關閉
難度 2/5 1-3 小時 新手友好度 75/100
JdeRobot/PerceptionMetrics#681 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1 小時以內 新手友好度 85/100
維護者通常 2 天內回覆