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

DispatchKeySet perf improvements #72828

Closed
wants to merge 8 commits into from

Conversation

bdhirsh
Copy link
Contributor

@bdhirsh bdhirsh commented Feb 15, 2022

Reland of #72403 after fixing some internal mobile failures

Stack from ghstack (oldest at bottom):

Reland of D34034847

Differential Revision: D34227615

Reland of D34034847

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

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 15, 2022

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/pytorch/pytorch/blob/307363ca452e2d6bc59b5d21ecfb0f8e9889731f/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default
Add ciflow labels to this PR to trigger more builds:

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
linux-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-manywheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
linux-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/trunk, ciflow/xla ✅ triggered
linux-bionic-rocm4.5-py3.7 ciflow/all, ciflow/default, ciflow/linux, ciflow/rocm, ciflow/trunk ✅ triggered
linux-docs ciflow/all, ciflow/cpu, ciflow/default, ciflow/docs, ciflow/linux, ciflow/trunk ✅ triggered
linux-vulkan-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-build ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-static ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7-no-ops ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
macos-arm64-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-arm64-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
macos-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
windows-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
Skipped Workflows
caffe2-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
docker-builds ciflow/all, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-custom-ops ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-full-jit ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-metal ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-full-jit ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda10.2-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow, ciflow/trunk 🚫 skipped
linux-docs-push ciflow/all, ciflow/cpu, ciflow/linux, ciflow/scheduled 🚫 skipped
linux-xenial-cuda11.3-py3.7-gcc7-no-ops ciflow/all, ciflow/cuda, ciflow/linux, ciflow/trunk 🚫 skipped
macos-10-15-py3-arm64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-10-15-py3-lite-interpreter-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-11-py3-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
parallelnative-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
periodic-libtorch-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled, ciflow/slow, ciflow/slow-gradcheck 🚫 skipped
periodic-linux-xenial-cuda11.1-py3.7-gcc7-debug ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
periodic-win-vs2019-cuda11.5-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-build ciflow/all, ciflow/android, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 15, 2022

🔗 Helpful links

💊 CI failures summary and remediations

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


  • 4/4 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

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

See GitHub Actions build pull / linux-xenial-py3.7-gcc5.4 / test (backwards_compat, 1, 1, linux.2xlarge) (1/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-03-24T22:20:11.4539537Z The PR is introduc...m to confirm whether this change is wanted or not.
2022-03-24T22:20:11.4525709Z processing existing schema:  text(__torch__.torch.classes.profiling.SourceRef _0) -> (str _0)
2022-03-24T22:20:11.4527275Z processing existing schema:  count(__torch__.torch.classes.profiling.InstructionStats _0) -> (int _0)
2022-03-24T22:20:11.4528662Z processing existing schema:  duration_ns(__torch__.torch.classes.profiling.InstructionStats _0) -> (int _0)
2022-03-24T22:20:11.4529941Z processing existing schema:  source(__torch__.torch.classes.profiling.SourceStats _0) -> (__torch__.torch.classes.profiling.SourceRef _0)
2022-03-24T22:20:11.4532037Z processing existing schema:  line_map(__torch__.torch.classes.profiling.SourceStats _0) -> (Dict(int, __torch__.torch.classes.profiling.InstructionStats) _0)
2022-03-24T22:20:11.4533351Z processing existing schema:  __init__(__torch__.torch.classes.profiling._ScriptProfile _0) -> (NoneType _0)
2022-03-24T22:20:11.4534176Z processing existing schema:  enable(__torch__.torch.classes.profiling._ScriptProfile _0) -> (NoneType _0)
2022-03-24T22:20:11.4535653Z processing existing schema:  disable(__torch__.torch.classes.profiling._ScriptProfile _0) -> (NoneType _0)
2022-03-24T22:20:11.4537663Z processing existing schema:  _dump_stats(__torch__.torch.classes.profiling._ScriptProfile _0) -> (__torch__.torch.classes.profiling.SourceStats[] _0)
2022-03-24T22:20:11.4539056Z processing existing schema:  __init__(__torch__.torch.classes.dist_rpc.WorkerInfo _0, str _1, int _2) -> (NoneType _0)
2022-03-24T22:20:11.4539537Z The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not. 
2022-03-24T22:20:11.4539815Z 
2022-03-24T22:20:11.4539896Z Broken ops: [
2022-03-24T22:20:11.4540161Z 	aten::to_sparse_csr(Tensor self) -> (Tensor)
2022-03-24T22:20:11.4540365Z ]
2022-03-24T22:20:11.5609093Z + cleanup
2022-03-24T22:20:11.5609379Z + retcode=1
2022-03-24T22:20:11.5609548Z + set +x
2022-03-24T22:20:11.5650841Z ##[error]Process completed with exit code 1.
2022-03-24T22:20:11.5687356Z ##[group]Run pytorch/pytorch/.github/actions/chown-workspace@master
2022-03-24T22:20:11.5687597Z env:

See GitHub Actions build pull / linux-docs / build-docs (python) (2/3)

Step: "Build python docs" (full log | diagnosis details | 🔁 rerun)

2022-03-24T22:20:31.5327367Z ImportError: canno...da/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T22:20:31.5323712Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
2022-03-24T22:20:31.5324070Z     from sphinx.application import Sphinx
2022-03-24T22:20:31.5324438Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/application.py", line 43, in <module>
2022-03-24T22:20:31.5324752Z     from sphinx.registry import SphinxComponentRegistry
2022-03-24T22:20:31.5325274Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/registry.py", line 24, in <module>
2022-03-24T22:20:31.5325554Z     from sphinx.builders import Builder
2022-03-24T22:20:31.5325917Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 26, in <module>
2022-03-24T22:20:31.5326240Z     from sphinx.util import import_object, logging, progress_message, rst, status_iterator
2022-03-24T22:20:31.5326638Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/rst.py", line 21, in <module>
2022-03-24T22:20:31.5326930Z     from jinja2 import Environment, environmentfilter
2022-03-24T22:20:31.5327367Z ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T22:20:31.5628177Z Makefile:38: recipe for target 'html' failed
2022-03-24T22:20:31.5628577Z make[1]: *** [html] Error 1
2022-03-24T22:20:31.5629072Z make[1]: Leaving directory '/var/lib/jenkins/workspace/docs'
2022-03-24T22:20:31.5629770Z Makefile:27: recipe for target 'html-stable' failed
2022-03-24T22:20:31.5630225Z make: *** [html-stable] Error 2
2022-03-24T22:20:31.5631836Z ++ code=2
2022-03-24T22:20:31.5632182Z ++ '[' 2 -ne 0 ']'
2022-03-24T22:20:31.5632467Z ++ set +x
2022-03-24T22:20:31.5632736Z =========================
2022-03-24T22:20:31.5672467Z =========================

See GitHub Actions build pull / linux-xenial-py3.7-gcc5.4 / test (docs_test, 1, 1, linux.2xlarge) (3/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-03-24T22:19:57.4404031Z ImportError: canno...da/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T22:19:57.4399926Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
2022-03-24T22:19:57.4400384Z     from sphinx.application import Sphinx
2022-03-24T22:19:57.4400922Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/application.py", line 43, in <module>
2022-03-24T22:19:57.4401316Z     from sphinx.registry import SphinxComponentRegistry
2022-03-24T22:19:57.4401690Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/registry.py", line 24, in <module>
2022-03-24T22:19:57.4402030Z     from sphinx.builders import Builder
2022-03-24T22:19:57.4402428Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 26, in <module>
2022-03-24T22:19:57.4402808Z     from sphinx.util import import_object, logging, progress_message, rst, status_iterator
2022-03-24T22:19:57.4403226Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/rst.py", line 21, in <module>
2022-03-24T22:19:57.4403542Z     from jinja2 import Environment, environmentfilter
2022-03-24T22:19:57.4404031Z ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T22:19:57.4708557Z Makefile:38: recipe for target 'doctest' failed
2022-03-24T22:19:57.4708830Z make: *** [doctest] Error 1
2022-03-24T22:19:57.4709019Z + cleanup
2022-03-24T22:19:57.4709170Z + retcode=2
2022-03-24T22:19:57.4709333Z + set +x
2022-03-24T22:19:57.4712058Z + cleanup
2022-03-24T22:19:57.4712244Z + retcode=2
2022-03-24T22:19:57.4712472Z + set +x
2022-03-24T22:19:57.4752662Z ##[error]Process completed with exit code 2.
2022-03-24T22:19:57.4787506Z ##[group]Run pytorch/pytorch/.github/actions/chown-workspace@master

1 failure not recognized by patterns:

Job Step Action
GitHub Actions pull / linux-docs / build-docs (cpp) Unknown 🔁 rerun

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.

bdhirsh added a commit that referenced this pull request Feb 15, 2022
Reland of D34034847

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

ghstack-source-id: 149112922
Pull Request resolved: #72828
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Feb 17, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 149379811

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Feb 17, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 149424246

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Feb 18, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 149482806

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Feb 18, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 149530057

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Feb 22, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 149705446

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Mar 22, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 151759834

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
Reland of D34034847

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Mar 24, 2022
Pull Request resolved: #72828

Reland of D34034847
ghstack-source-id: 152161453

Differential Revision: [D34227615](https://our.internmc.facebook.com/intern/diff/D34227615/)
@bdhirsh bdhirsh requested review from albanD and ezyang March 25, 2022 13:10
facebook-github-bot pushed a commit that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: #72828

Reland of D34034847 (8aa3620)
ghstack-source-id: 152161453

Test Plan: confirm that Milan tests are passing

Reviewed By: ezyang, albanD

Differential Revision: D34227615

fbshipit-source-id: c7695e16dba3076e8ab9df8654327c5d57e92c77
@github-actions
Copy link
Contributor

Hey @bdhirsh.
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.

@facebook-github-bot facebook-github-bot deleted the gh/bdhirsh/184/head branch March 29, 2022 14:17
@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by a9216cd. To re-land this change, please open another pull request, assignthe same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk).

@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by a9216cd. To re-land this change, please open another pull request, assignthe same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk).

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