提交 a1efd4d5 编写于 作者: M Megvii Engine Team

fix(mge/parampack): fix param pack when no param left

GitOrigin-RevId: b88b87606411cb7bae598dcd4792014cad6dbd81
上级 e0e18964
......@@ -211,6 +211,8 @@ class AllreduceCallback:
self._grad_origin_device = dict()
def _pack(self, dtype):
if len(self._packing_list[dtype]) == 0:
return
grad_list = [self._gradients_dict[p] for p in self._packing_list[dtype]]
shapes = [p.shape for p in self._packing_list[dtype]]
reduced_grads = pack_allreduce_split(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册