Summary:
Previously, the backend code "silently" ignores reduce_range=true when
using the qnnpack backend (which does not require a reduction in range).
We evaluated either 1) respecting the reduction in range to conform with
other backends (e.g., fbgemm) even when qnnpack does support the full
range and outputting a warning to let the user know that reduce_range
shoudl be set to false for qnnpack backend 2) throwing a warning and letting the user know that the
reduce_range=true setting is being ignored.
Option 1 would halve the range which could have some negative
implications to accuracy and lead to bc-breaking changes. Option 2 is also not ideal because it ignores any user settings
for reduce_range=true when using the qnnpack backend with dynamic and
linear quantized ops. We decided to go with option 2 as it is not
bc-breaking.
Fixes#68278
Test plan:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79273
Approved by: https://github.com/jerryzh168, https://github.com/vkuzo
Relates to #76700
**Overview**: One edge case not accounted for in the original logic of `isGreen` was for commits with no workflow checks. Similarly, if any of the required checks are not present (ex: if all of the pull checks are skipped), the workflow should not be promoteble. A commit should only be promoteable if there is it least one workflow check from each required group present (i.e. none of them are skipped)
**Test Plan:** Verify that commits on the HUD with no workflow checks are not considered promote-able. Added a test case with no workflows in `test_print_latest_commits.py`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79565
Approved by: https://github.com/seemethere
Relates to #76700
**Overview**: Wrote GHA to get the latest commit SHA. Another component of the script is pushing this SHA to the viable/strict branch, which I will test on pytorch/pytorch-canary.
Todo in the next PR: add comment explaining cron, replace package installation statements with txt file
**Test Plan:** Monitor github actions results to see if the SHA printed is correct by running GHA on pytorch/pytorch-canary. The successful test workflow is [here](https://github.com/pytorch/pytorch-canary/runs/6888486129?check_suite_focus=true).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79559
Approved by: https://github.com/janeyx99
Summary: The _detect_dynamic_vs_static function was added to take in a
prepared fx graph model that already had ModelReportObservers built into
it and uses the collected information to determine whether input and
output are stationary or non-stationary and provides feedback on whether
to make linear modules static or dynamic based on this information.
This PR will be followed up soon with another PR that will more
rigoursly test the whole end to end performance of this system, which is
primarily how the function in this PR will be tested for functionality,
which is why this one only has 1 test.
Test Plan: python test/quantization/fx/test_model_report_fx.py TestModelReportDetectDynamicStatic
Reviewers:
Subscribers:
Tasks:
Tags:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79326
Approved by: https://github.com/HDCharles
Summary:
- StaticModule was being created at runtime which was adding overhead to the forked operation
- Move staticModule creation to outside of runtime so that StaticRuntime instance can be created on top of same staticModule that is created once
Differential Revision: D37126923
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79482
Approved by: https://github.com/tenpercent
This PR adds references for:
- `torch.softmax`
- `torch.log_softmax`
- `torch.logsumexp`
Unfortunately, none of them currently pass `test_python_ref_executor` even with `"aten"` executor.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79423
Approved by: https://github.com/mruberry
This PR fixes a bug with `broadcast_in_dim` leading to the situation when reduction ops were not allowed to be used before `broadcast_in_dim`.
With this PR it's possible to run
```py
import torch
import torch._refs
from torch._prims.executor import make_traced
def foo(a):
return torch._refs.mean(a, keepdim=False)
a = torch.randn(3, 3, device='cuda')
make_traced(foo)(a, executor="nvfuser")
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79444
Approved by: https://github.com/mruberry, https://github.com/jjsjann123
Summary: The purpose of this is to add to the module report functioality
by creating an observer that will take a prepared fx module and suggest
whether static or dynamic quantization is more appropriate. The tests
for this have been written and included in the location indicated by the
Test Plan
Test Plan: python test/quantization/fx/test_model_report_fx.py TestModelReportObserver
Reviewers:
Subscribers:
Tasks:
Tags:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79243
Approved by: https://github.com/jerryzh168, https://github.com/andrewor14
Relates to #76700
**Overview:** Wrote GHA to get the latest commit SHA. Another component of the script is pushing this SHA to the viable/strict branch but I'm planning to test that locally after verifying that this part is correct.
**Test Plan:** Monitor github actions results to see if the SHA printed is correct -- I wasn't able to check this on my personal fork.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79548
Approved by: https://github.com/seemethere