通过实践验证,我们成功地解决了Grad strides与bucket view strides不匹配的问题
发布时间
阅读量:
阅读量
这一问题的出现源于小虎在应用DP过程中所遇到的情况,应对措施是在特定变量后附加.contiguous()方法。
环境
Pytorch2.0 搭配 python 3.10 版本
问题原文
/home/xiaohu/anaconda3/envs/smor/lib/python3.10/site-packages/torch/autograd/__init__.py:251: UserWarning: Grad strides do not match bucket view strides. This may indicate grad was not created according to the gradient layout contract, or that the param's strides changed since DDP was constructed. This is not an error, but may impair performance.
grad.sizes() = [3, 24, 1, 1], strides() = [24, 1, 24, 24]
bucket_view.sizes() = [3, 24, 1, 1], strides() = [24, 1, 1, 1] (Trigg
全部评论 (0)
还没有任何评论哟~
