mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-15 22:53:12 +00:00
move empty cache
This commit is contained in:
parent
f7e532511c
commit
1723a02860
@ -129,6 +129,7 @@ class BaseConsumer:
|
|||||||
|
|
||||||
if episode != self.num_episodes - 1 or step != self.num_update_per_episode - 1:
|
if episode != self.num_episodes - 1 or step != self.num_update_per_episode - 1:
|
||||||
print(f"[T{dist.get_rank()}] Sync model episode {episode} step {step}")
|
print(f"[T{dist.get_rank()}] Sync model episode {episode} step {step}")
|
||||||
|
torch.cuda.empty_cache()
|
||||||
state_dict = self.state_dict()
|
state_dict = self.state_dict()
|
||||||
if self.rank == 0:
|
if self.rank == 0:
|
||||||
ray_broadcast_tensor_dict(
|
ray_broadcast_tensor_dict(
|
||||||
|
Loading…
Reference in New Issue
Block a user