Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def check_mask_update(
return # not a one-shot run

_LOGGER.info("Running OBS Pruning")
torch.cuda.empty_cache()
if self._scorer._is_main_proc:
# collect grads for empirical inverse Fisher estimation
self._scorer._enabled_grad_buffering = True
Expand All @@ -254,6 +255,7 @@ def check_mask_update(
self._scorer._enabled_grad_buffering = False

super().check_mask_update(module, epoch, steps_per_epoch, **kwargs)
torch.cuda.empty_cache()

def _get_mask_creator(
self, param_names: List[str], params: List[Parameter]
Expand Down