Open lixiang007666 opened 6 days ago
From @Eigensystem: 可能是由 kernel 选择引起的误差。
From @Eigensystem: 可能是由 kernel 选择引起的误差。
cuDNN会根据输入的形状和类型自动选择最优的算法。不同并行度导致使用kernel不同,从而生成图片有差异?
我觉得可以
确保每次运行时使用的cuDNN算法是确定性的。(可能没帮助) torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False
观察不同并行度cpu运行结果。可能需要试试用gloo后端运行xDiT。
问题描述
固定 seed 测了下,为了确认 seed 是固定的,先重复运行了多卡脚本,确保每次图像不变。
在这个条件下,不同卡数生成的图像:
可以看到在 1024 下是有损的,但是两卡的时候损失比较的小(也分seed)。
一个观察是 512 下损失会更大。
复现脚本: