Skip to content

Conversation

@HDCharles
Copy link
Contributor

@HDCharles HDCharles commented Mar 28, 2022

Stack from ghstack (oldest at bottom):

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D35240274

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 28, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit f25677b (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@HDCharles HDCharles changed the title Make quantization work with sparsity parametrizations [ao][sparsity] make sparsity and PTQ compose Mar 28, 2022
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@HDCharles HDCharles requested review from andrewor14, dzdang, jerryzh168, terrychenism and vkuzo and removed request for z-a-f March 28, 2022 23:51
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using a new nonparam_type function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D35240274](https://our.internmc.facebook.com/intern/diff/D35240274)

[ghstack-poisoned]
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D35240274](https://our.internmc.facebook.com/intern/diff/D35240274)

[ghstack-poisoned]
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D35240274](https://our.internmc.facebook.com/intern/diff/D35240274)

[ghstack-poisoned]
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

self.assertTrue(isinstance(mod[5], torch.nn.quantized.Linear))
self.assertEqual(mod(torch.randn(1, 4, 4, 4)).shape, torch.Size([1, 4, 4, 4]))

def test_s_prep_before_q_prep(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe we can add a bit more context to this test in docstring about what this is testing

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D35240274](https://our.internmc.facebook.com/intern/diff/D35240274)

[ghstack-poisoned]
@HDCharles HDCharles requested a review from lezcano as a code owner April 4, 2022 16:12
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D35240274](https://our.internmc.facebook.com/intern/diff/D35240274)

[ghstack-poisoned]
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@HDCharles
Copy link
Contributor Author

@HDCharles has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@lezcano lezcano removed their request for review April 4, 2022 20:06
facebook-github-bot pushed a commit that referenced this pull request Apr 5, 2022
Summary:
Pull Request resolved: #74845

This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan:
python test/test_ao_sparsity.py TestComposability

Imported from OSS

Reviewed By: jerryzh168

Differential Revision: D35240274

fbshipit-source-id: 7294d89c9c2e069e51d8b9bafa45c15f92bed124
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2022

Hey @HDCharles.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

NesrineMHB pushed a commit to NesrineMHB/pytorch that referenced this pull request Apr 7, 2022
Summary: This PR adds support for quantization flow to detect
parametrized modules and match them using their original module types.
This mainly involved using the new type_before_parametrizations function rather than
type to check for module mathcing

Test Plan: python test/test_ao_sparsity.py TestComposability

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: deff7a8
Pull Request resolved: pytorch/pytorch#74845
@facebook-github-bot facebook-github-bot deleted the gh/HDCharles/62/head branch April 8, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants