Skip to content

Commit

Permalink
[Bug] Fix torch2 error (#536)
Browse files Browse the repository at this point in the history
fix torch2 error
  • Loading branch information
humu789 committed May 17, 2023
1 parent 7586af0 commit a578fad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit a578fad

Please sign in to comment.