-
Notifications
You must be signed in to change notification settings - Fork 233
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
[PTQ][OV] ChannelAlignment algorithm is ready to be enabled by default #2073
[PTQ][OV] ChannelAlignment algorithm is ready to be enabled by default #2073
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2073 +/- ##
============================================
+ Coverage 0 35.93% +35.93%
============================================
Files 0 476 +476
Lines 0 42446 +42446
============================================
+ Hits 0 15255 +15255
- Misses 0 27191 +27191
|
Full validation showed no degradation with CA algorithm enabled for supported models.
timm/mobilenetv3_small_050: Improvement: Metric value is better than reference 0.38792 > 0.38638 |
1eb303f
to
dd84e18
Compare
@KodiaqQ, @andrey-churkin, please take a look |
@@ -152,7 +152,7 @@ class AdvancedQuantizationParameters: | |||
overflow_fix: OverflowFix = OverflowFix.FIRST_LAYER | |||
quantize_outputs: bool = False | |||
inplace_statistics: bool = True | |||
disable_channel_alignment: bool = True | |||
disable_channel_alignment: bool = False |
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, discuss influence of this change on nncf.quantize_with_accuracy_control(...)
with @andrey-churkin.
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.
These changes do not affect nncf.quantize_with_accuracy_control(...)
when tune_hyperparams
is set to False
. However, when tune_hyperparams
is set to True
, we cannot apply hyperparameter tuning due to this check.
nncf/nncf/quantization/algorithms/post_training/algorithm.py
Lines 166 to 170 in 2fe6ee3
def get_statistic_points(self, model: TModel, graph: NNCFGraph) -> StatisticPointsContainer: | |
if self.first_stage_algorithms: | |
raise NotImplementedError( | |
"Statistic points are not supported yet for SmoothQuant and ChannelAlignment 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.
@andrey-churkin, what should I do to make tune_hyperparams
works again?
for first_stage_algorithm in self.first_stage_algorithms: | ||
algorithm = first_stage_algorithm.algorithm | ||
|
||
for algorithm in self.first_stage_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.
Are there dependencies in the order of algorithms? I mean, if I apply ChannelAlignment
first and then SmoothQuant
, does something change?
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've checked and it looks like the order of this algorithms does not matter
…nt_improvements_full
@alexsu52, @andrey-churkin, I've disabled CA by default to prevent Tuning Hyperparameters failing. I suggest to merge this PR as it's including some improvements for CA algorithm |
I agree. Please update the PR title. |
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
Reason for changes
Related tickets
114328
114583
Tests
tests/post_training/test_templates/test_channel_alignment.py is updated