Skip to content

Add quantized::mul nnapi converter #63913

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

Closed
wants to merge 3 commits into from

Conversation

axitkhurana
Copy link

@axitkhurana axitkhurana commented Aug 25, 2021

Stack from ghstack:

Summary:

As Title

Test Plan:

pytest test/test_nnapi.py::TestNNAPI::test_qadd

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D30531890

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

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

facebook-github-bot commented Aug 25, 2021

🔗 Helpful links

💊 CI failures summary and remediations

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


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build win-vs2019-cpu-py3 / test (default, 2, 2, windows.4xlarge) (1/1)

Step: "Run test scripts" (full log | diagnosis details | 🔁 rerun)

2021-09-24T22:04:30.0759470Z ERROR [0.016s]: test_poisson_sample (__main__.TestDistributions)
2021-09-24T22:04:30.0753172Z   File "distributions/test_distributions.py", line 812, in _check_sampler_discrete
2021-09-24T22:04:30.0753977Z     chisq, p = scipy.stats.chisquare(counts[msk], pmf[msk] * num_samples)
2021-09-24T22:04:30.0754832Z   File "c:\jenkins\miniconda3\lib\site-packages\scipy\stats\stats.py", line 6852, in chisquare
2021-09-24T22:04:30.0755500Z     return power_divergence(f_obs, f_exp=f_exp, ddof=ddof, axis=axis,
2021-09-24T22:04:30.0756243Z   File "c:\jenkins\miniconda3\lib\site-packages\scipy\stats\stats.py", line 6694, in power_divergence
2021-09-24T22:04:30.0756860Z     raise ValueError(msg)
2021-09-24T22:04:30.0757680Z ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but the percent differences are:
2021-09-24T22:04:30.0758557Z 0.008265582255680495
2021-09-24T22:04:30.0758741Z 
2021-09-24T22:04:30.0759006Z ======================================================================
2021-09-24T22:04:30.0759470Z ERROR [0.016s]: test_poisson_sample (__main__.TestDistributions)
2021-09-24T22:04:30.0760038Z ----------------------------------------------------------------------
2021-09-24T22:04:30.0760484Z Traceback (most recent call last):
2021-09-24T22:04:30.0761089Z   File "distributions/test_distributions.py", line 1352, in test_poisson_sample
2021-09-24T22:04:30.0761703Z     self._check_sampler_discrete(Poisson(rate),
2021-09-24T22:04:30.0762387Z   File "distributions/test_distributions.py", line 812, in _check_sampler_discrete
2021-09-24T22:04:30.0763095Z     chisq, p = scipy.stats.chisquare(counts[msk], pmf[msk] * num_samples)
2021-09-24T22:04:30.0763830Z   File "c:\jenkins\miniconda3\lib\site-packages\scipy\stats\stats.py", line 6852, in chisquare
2021-09-24T22:04:30.0764516Z     return power_divergence(f_obs, f_exp=f_exp, ddof=ddof, axis=axis,
2021-09-24T22:04:30.0765252Z   File "c:\jenkins\miniconda3\lib\site-packages\scipy\stats\stats.py", line 6694, in power_divergence
2021-09-24T22:04:30.0765844Z     raise ValueError(msg)

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

Click here to manually regenerate this comment.

@axitkhurana
Copy link
Author

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

@axitkhurana axitkhurana changed the title add qmul Add quantized::mul nnapi converter Sep 2, 2021
Akshit Khurana added 2 commits September 2, 2021 11:53
Summary:

As Title

Test Plan:

pytest test/test_nnapi.py::TestNNAPI::test_qadd

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Summary:

As Title

Test Plan:

pytest test/test_nnapi.py::TestNNAPI::test_qadd

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@axitkhurana axitkhurana requested a review from dreiss September 2, 2021 19:03
@axitkhurana
Copy link
Author

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

def forward(self, lhs, rhs):
return func.mul(lhs, rhs)

for (name, mod) in [("add", AddMod), ("add_relu", AddReluMod), ("mul", MulMod)]:
with self.subTest(name):
Copy link
Contributor

Choose a reason for hiding this comment

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

Could do subTest(mod.__name__): to reduce the boilerplate here.

@facebook-github-bot facebook-github-bot deleted the gh/axitkhurana/22/head branch September 28, 2021 14:20
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.

3 participants