mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-07 20:10:17 +00:00
[async io]supoort async io (#6137)
* support async optimizer save/load * fix * fix * support pin mem * Update low_level_zero_plugin.py * fix * fix * fix * fix * fix
This commit is contained in:
committed by
Hongxin Liu
parent
b90835bd32
commit
eb69e640e5
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List, OrderedDict
|
||||
from typing import Any, List, OrderedDict, Tuple
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
@@ -78,7 +78,9 @@ def check_state_dict_equal(
|
||||
v1 = v1.to(v2.dtype)
|
||||
assert_close_loose(v1, v2)
|
||||
else:
|
||||
assert v1 == v2, f"{v1} not equals to {v2}"
|
||||
if isinstance(v1, Tuple) and not isinstance(v2, Tuple):
|
||||
v2 = tuple(v2)
|
||||
assert v1 == v2, f"{v1} not equals to {v2}. {type(v1)}, {type(v2)}"
|
||||
|
||||
|
||||
def check_state_dict_equal_pytree(d1: OrderedDict, d2: OrderedDict, ignore_device: bool = True):
|
||||
|
Reference in New Issue
Block a user