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

[Torch FX] PTQ MinMax parameters test #2989

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

rk119
Copy link
Contributor

@rk119 rk119 commented Sep 25, 2024

Changes

New test file added in tests/torch/fx. Implemented TemplateTestPTQParams for PTQ MinMax for TorchFX backend.

Related tickets

#2873

@rk119 rk119 requested a review from a team as a code owner September 25, 2024 14:02
@github-actions github-actions bot added the NNCF PT Pull requests that updates NNCF PyTorch label Sep 25, 2024
@daniil-lyakhov daniil-lyakhov self-assigned this Sep 25, 2024
@daniil-lyakhov daniil-lyakhov self-requested a review September 25, 2024 14:16
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rk119, thank you for the contribution! One small comment from my side:

Comment on lines 53 to 71
class LinearTestModel(nn.Module):
INPUT_SIZE = None

def __init__(self):
super().__init__()
self.conv1 = create_conv(3, 3, 1)
self.bn1 = create_bn(3)
self.relu = nn.ReLU()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.conv2 = create_conv(3, 1, 1)
self.bn2 = create_bn(1)

def forward(self, x):
x = self.relu(self.conv1(x))
x = self.bn1(x)
x = self.avg_pool(x)
x = self.relu(self.conv2(x))
x = self.bn2(x)
return x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rk119, could you please put this model to nncf/tests/torch/test_models/synthetic.py with a name LinearPTQParamsTestModel and reuse it in both Torch and TorchFX tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rk119, could you please put this model to nncf/tests/torch/test_models/synthetic.py with a name LinearPTQParamsTestModel and reuse it in both Torch and TorchFX tests?

Alright.

@alexsu52 alexsu52 merged commit b840385 into openvinotoolkit:develop Sep 25, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF PT Pull requests that updates NNCF PyTorch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants