首页
常用链接
关于
Search
1
Pytorch DDP
2,414 阅读
2
Pytorch 常见问题
1,464 阅读
3
视频时序切分
1,252 阅读
4
2022年微信大数据比赛(多模态短视频分类)总结
966 阅读
5
中文场景下的CLIP图文预训练
955 阅读
分布式训练
AIGC
多模态理解
阅读
论文阅读
算法基础
C++
Python
LeetCode
Shell
Pytorch
Segmentation
其他
广告
购房/投资
职场经验复盘
广告基础知识
推荐算法
创意优选
默认分类
Search
标签搜索
论文速读
AIGC
人工智能
python
视频生成
Pandas
DiT
图像生成
transformer
视觉传统方法
创意质量
git
shell
视频理解
Pytroch
nlp
DDP
图像自监督预训练
安装包
视频流行度
Jefxiong
累计撰写
57
篇文章
累计收到
8
条评论
首页
栏目
分布式训练
AIGC
多模态理解
阅读
论文阅读
算法基础
C++
Python
LeetCode
Shell
Pytorch
Segmentation
其他
广告
购房/投资
职场经验复盘
广告基础知识
推荐算法
创意优选
默认分类
页面
常用链接
关于
搜索到
1
篇与
Pytroch
的结果
2021-05-23
Pytorch 常见问题
1.CUDA_VISIBLE_DEVICES设置无效,始终占用GPU0? 1. 在import torch前设置环境变量 2. CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=3 python train.py 2.RuntimeError: CUDA error: device-side assert triggered 设置环境变量,让报错显示更具体的代码行 import os os.environ["CUDA_LAUNCH_BLOCKING"] = "1" 3.RuntimeError: DataLoader worker (pid xxx) is killed by signal: Aborted. what(): CUDA error: initialization error pytorch github issue ref google找到的文章,大多怀疑是内存问题 尝试修改pin_memory没有效用 尝试修改shm没有效果,mount -o remount,size=32g /dev/shm 尝试改小num_worker无效果(16->8)将num_workers设置为0可以解决问题,但肯定不是最优解!!! 4.resume training时,出现GPU OOM的问题 在DDP训练场景下进行resume training可能出现该问题,原因在于每个进程torch.load都加载在同一块卡上,导致最后OOM。解决方案: map_location指定加载在哪块卡上 checkpoint = torch.load(checkpoint_path, map_location='cuda:{}'.format(opts.local_rank)) 5.CUDNN和pytorch版本不匹配 可以从torch_stable.html下载安装 6 . unrecognized arguments: --local_rank,由于torch2.0升级导致,修复方案: python -m torch.distributed.launch xxx 替换为 torchrun xxx
2021年05月23日
1,464 阅读
0 评论
6 点赞
粤ICP备2021042327号