Skip to content

Commit

Permalink
fix ipex stats bug (#1555)
Browse files Browse the repository at this point in the history
Signed-off-by: xin3he <xin3.he@intel.com>
  • Loading branch information
xin3he committed Jan 22, 2024
1 parent 1d60f61 commit 5af3834
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neural_compressor/adaptor/pytorch.py
Expand Up @@ -2599,7 +2599,8 @@ def get_non_quant_modules(self, model_kwargs):
"<class 'torch.nn.modules.conv.Conv2d'>": "Conv2d",
"<class 'torch.nn.modules.conv.Conv3d'>": "Conv3d",
"<class 'torch.nn.modules.activation.ReLU'>": "ReLU",
"<method 'add' of 'torch._C._TensorBase' objects>": "add",
"<method 'add' of 'torch._C._TensorBase' objects>": "add", # for IPEX < 2.2
"<method 'add' of 'torch._C.TensorBase' objects>": "add", # for IPEX >= 2.2
"<class 'torch.nn.modules.pooling.AdaptiveAvgPool2d'>": "AdaptiveAvgPool2d",
"Linear_Relu": "Linear",
"<class 'torch.nn.modules.linear.Linear'>": "Linear",
Expand Down
1 change: 1 addition & 0 deletions test/algorithm/test_smooth_quant.py
Expand Up @@ -41,6 +41,7 @@ def __init__(self):
def forward(self, x):
out = self.fc1(x)
out = self.fc2(out)
out = out + out
return out


Expand Down

0 comments on commit 5af3834

Please sign in to comment.