-
Notifications
You must be signed in to change notification settings - Fork 246
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
[TorchFX]: Test Fast Bias Correction algorithm #2812
Conversation
@anzr299, Nice work! |
tests/torch/fx/graph_manager.py
Outdated
from nncf.torch.model_graph_manager import find_const_node_in_constant_subgraph | ||
|
||
|
||
def is_node_with_bias(node: NNCFNode, nncf_graph: NNCFGraph) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anzr299, @daniil-lyakhov, it looks like, this is general functions and can be used in the fast bias correction. Please consider possible refactoring to use functions in the NNCF algorithms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed it for this PR for now. We can add it back in a follow up PR when refactoring
@anzr299, please rebase your changes |
Done |
|
||
@staticmethod | ||
def backend_specific_model(model: torch.nn.Module, tmp_dir: str): | ||
fx_model = TestTorchFXFBCAlgorithm._get_fx_model(model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move code from _get_fx_model
to the backend_specific_model` function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
Add Fast BC test in tests/torch/fx.
Related tickets
#2809
Tests
The implemented test class inherits from the template for Fast bias correction.