mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-03 18:19:58 +00:00
[hotfix] fix grad accumulation plus clipping for gemini (#5002)
This commit is contained in:
@@ -637,6 +637,7 @@ class Chunk:
|
||||
# grad chunk is initialized, just reallocate cuda global chunk
|
||||
self.grad_chunk.cuda_shard = None
|
||||
self.grad_chunk.is_gathered = True
|
||||
self.grad_chunk.l2_norm = None
|
||||
alloc_storage(self.grad_chunk.cuda_global_chunk)
|
||||
|
||||
return self.grad_chunk
|
||||
|
Reference in New Issue
Block a user