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

[Bug] Try to fix CI #502

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion mmrazor/engine/runner/quantization_loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@

from torch.utils.data import DataLoader

from mmrazor.models import register_torch_fake_quants, register_torch_observers
from mmrazor.models.fake_quants import (enable_param_learning,
enable_static_estimate, enable_val)
from mmrazor.registry import LOOPS
from mmrazor.models import register_torch_fake_quants, register_torch_observers

TORCH_observers = register_torch_observers()
TORCH_fake_quants = register_torch_fake_quants()


@LOOPS.register_module()
class QATEpochBasedLoop(EpochBasedTrainLoop):
"""`EpochBasedLoop` for `QuantizationAwareTraining`
Expand Down
2 changes: 1 addition & 1 deletion mmrazor/models/fake_quants/torch_fake_quants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from mmrazor.utils import get_package_placeholder
torch_fake_quant_src = get_package_placeholder('torch>=1.13')


# TORCH_fake_quants = register_torch_fake_quants()
# TORCH_fake_quants including:
# FakeQuantize
Expand All @@ -35,4 +36,3 @@ def register_torch_fake_quants() -> List[str]:
MODELS.register_module(module=_fake_quant)
torch_fake_quants.append(module_name)
return torch_fake_quants

1 change: 1 addition & 0 deletions mmrazor/models/observers/torch_observers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def reset_min_max_vals(self):

PerChannelMinMaxObserver.reset_min_max_vals = reset_min_max_vals


# TORCH_observers = register_torch_observers()
# TORCH_observers including:
# FixedQParamsObserver
Expand Down