mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 02:26:51 +00:00
[NFC] polish comments for Chunk class (#2116)
This commit is contained in:
@@ -2,23 +2,22 @@ from typing import Optional
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
|
||||
from colossalai.gemini.memory_tracer import MemStatsCollector
|
||||
from colossalai.gemini.ophooks import BaseOpHook
|
||||
from colossalai.gemini.stateful_tensor import TensorState
|
||||
from colossalai.gemini.stateful_tensor_mgr import StatefulTensorMgr
|
||||
from colossalai.logging import get_dist_logger
|
||||
from colossalai.registry import OPHOOKS
|
||||
|
||||
from colossalai.utils import get_current_device
|
||||
|
||||
from colossalai.zero.shard_utils import BaseShardStrategy
|
||||
from colossalai.gemini.ophooks import BaseOpHook
|
||||
|
||||
from colossalai.gemini.stateful_tensor_mgr import StatefulTensorMgr
|
||||
from colossalai.gemini.memory_tracer import MemStatsCollector
|
||||
from colossalai.gemini.stateful_tensor import TensorState
|
||||
|
||||
|
||||
@OPHOOKS.register_module
|
||||
class ZeroHook(BaseOpHook):
|
||||
"""
|
||||
A hook to process sharded param for ZeRO method.
|
||||
Warning: this class has been deprecated after version 0.1.12
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
|
Reference in New Issue
Block a user