Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added GlobalDriftCompensationWithExactReference drift compensation class #674

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed linting errors
coreylammie committed Jan 29, 2025
commit 6ae0b1568ba4abb0b7864ededd05a5c7d2980b1d
2 changes: 2 additions & 0 deletions src/aihwkit/inference/compensation/drift.py
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@

"""Global drift compensation for inference."""

from typing import Tuple

from torch.autograd import no_grad
from torch import abs as torch_abs
from torch import clamp, Tensor, eye
2 changes: 1 addition & 1 deletion src/aihwkit/simulator/tiles/inference.py
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ def init_mapping_scales(self) -> None:

@no_grad()
def _forward_drift_readout_tensor(
self, reset_if: bool = False, is_perfect=False
self, reset_if: bool = False, is_perfect: bool = False
) -> Optional[Tensor]:
"""Perform a forward pass using the drift read-out tensor.