[doc] added documentation to chunk and chunk manager (#1094)

* [doc] added documentation to chunk and chunk manager

* polish code

* polish code

* polish code
This commit is contained in:
Frank Lee
2022-06-10 15:33:06 +08:00
committed by GitHub
parent 1f894e033f
commit cb18922c47
3 changed files with 215 additions and 12 deletions

View File

@@ -64,7 +64,7 @@ class ZeroOptimizer(ColossalaiOptimizer):
def _update_params_ptr(self):
for group in self.optim.param_groups:
for p in group['params']:
if not self.module.chunk_manager.get_chunk(p).is_free:
if not self.module.chunk_manager.get_chunk(p).is_empty:
p.data = self.fp16_param_to_fp32_param[p]
else:
assert p.grad is None