Skip to content

Commit

Permalink
Check contiguous tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Mar 13, 2024
1 parent 38d5616 commit 61852da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kronfluence/module/tracked_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ def backward_hook(output_gradient: torch.Tensor) -> None:
storage=self._storage,
damping=self.score_args.damping,
)
assert preconditioned_gradient.is_contiguous()
self._cached_per_sample_gradient = None
preconditioned_gradient = preconditioned_gradient.to(dtype=self.score_args.score_dtype)

Expand Down

0 comments on commit 61852da

Please sign in to comment.