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] Fix torch2 error #536

Merged
merged 1 commit into from
May 17, 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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
'relu_qat', 'bn_qat', 'bn_relu_qat', 'func'
])

if digit_version(torch.__version__) >= digit_version('1.13.0'):
if digit_version(
torch.__version__) >= digit_version('1.13.0') and digit_version(
torch.__version__) <= digit_version('1.13.1'):
_Conv1dMetadata = _ConvMetadata(
nn.Conv1d, nn.ConvTranspose1d, nn.BatchNorm1d, nnqr.Conv1d,
nnqr.ConvTranspose1d, nni.ConvReLU1d, nni.ConvBn1d, nni.ConvBnReLU1d,
Expand Down
4 changes: 3 additions & 1 deletion mmrazor/structures/quantization/backend_config/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
from .openvino import get_openvino_backend_config
from .tensorrt import get_tensorrt_backend_config

if digit_version(torch.__version__) >= digit_version('1.13.0'):
if digit_version(
torch.__version__) >= digit_version('1.13.0') and digit_version(
torch.__version__) <= digit_version('1.13.1'):
BackendConfigs = {
'academic': get_academic_backend_config(),
'native': get_native_backend_config(),
Expand Down
Loading