fix #3324
This commit is contained in:
1 parent
3b43a3b7c5
commit
942362d008
2 files changed
+3
-2
No files matched your search
@@ -132,8 +132,9 @@ def gradient_checkpointing_enable(
|
||||
|
||||
if "value" in inspect.signature(self._set_gradient_checkpointing).parameters: # old GC format
|
||||
self.apply(partial(self._set_gradient_checkpointing, value=True))
|
||||
self.enable_input_require_grads()
|
||||
logger.warning("You are using the old GC format, some features (e.g. BAdam) will be invalid.")
|
||||
else:
|
||||
else: # have already enabled input require gradients
|
||||
self._set_gradient_checkpointing(enable=True, gradient_checkpointing_func=custom_gradient_checkpointing_func)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user