We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 625ea52 commit c66fdafCopy full SHA for c66fdaf
deepspeed/runtime/zero/stage3.py
@@ -2915,7 +2915,8 @@ def needs_offload(target):
2915
2916
# contiguous bucket
2917
if needs_offload(OffloadStateTypeEnum.contiguous_grad_buffer):
2918
- if hasattr(self, "_DeepSpeedZeroOptimizer_Stage3__ipg_bucket_flat_buffer"):
+ if hasattr(self, "_DeepSpeedZeroOptimizer_Stage3__ipg_bucket_flat_buffer"
2919
+ ) and self.__ipg_bucket_flat_buffer is not None:
2920
# Record properties like shape, strides, etc. as a meta tensor
2921
self.grad_buffer_meta = self.__ipg_bucket_flat_buffer.to("meta")
2922
self.__ipg_bucket_flat_buffer = None
0 commit comments