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

[Static runtime] refactor static runtime to expose useful liveness methods #62995

Closed
wants to merge 19 commits into from

Conversation

@facebook-github-bot facebook-github-bot added oncall: jit Add this issue/PR to JIT oncall triage queue cla signed labels Aug 9, 2021
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 9, 2021

🔗 Helpful links

💊 CI failures summary and remediations

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


  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

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

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (1/2)

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

Nov 03 20:07:14 FAIL [0.005s]: test_forward_mod...D_corrcoef_cpu_float64 (__main__.TestGradientsCPU)
Nov 03 20:07:14     result = test(self, **param_kwargs)
Nov 03 20:07:14   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 737, in test_wrapper
Nov 03 20:07:14     return test(*args, **kwargs)
Nov 03 20:07:14   File "test_ops.py", line 729, in test_forward_mode_AD
Nov 03 20:07:14     self._forward_grad_helper(device, dtype, op, op.get_op())
Nov 03 20:07:14   File "test_ops.py", line 723, in _forward_grad_helper
Nov 03 20:07:14     check_undefined_grad=False, check_batched_grad=False)
Nov 03 20:07:14 AssertionError: NotImplementedError not raised : Running forward AD for an OP that has does not support it did not raise any error. If your op supports forward AD, you should set supports_forward_ad=True
Nov 03 20:07:14 
Nov 03 20:07:14 ======================================================================
Nov 03 20:07:14 FAIL [0.005s]: test_forward_mode_AD_corrcoef_cpu_float64 (__main__.TestGradientsCPU)
Nov 03 20:07:14 ----------------------------------------------------------------------
Nov 03 20:07:14 Traceback (most recent call last):
Nov 03 20:07:14   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 371, in instantiated_test
Nov 03 20:07:14     result = test(self, **param_kwargs)
Nov 03 20:07:14   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 737, in test_wrapper
Nov 03 20:07:14     return test(*args, **kwargs)
Nov 03 20:07:14   File "test_ops.py", line 729, in test_forward_mode_AD
Nov 03 20:07:14     self._forward_grad_helper(device, dtype, op, op.get_op())
Nov 03 20:07:14   File "test_ops.py", line 723, in _forward_grad_helper
Nov 03 20:07:14     check_undefined_grad=False, check_batched_grad=False)

See GitHub Actions build Lint / quick-checks (2/2)

Step: "Ensure correct trailing newlines" (full log | diagnosis details | 🔁 rerun)

2021-11-03T19:05:09.1798135Z python: can't open..._launches.py': [Errno 2] No such file or directory
2021-11-03T19:05:09.1490298Z ##[group]Run set -eux
2021-11-03T19:05:09.1490770Z �[36;1mset -eux�[0m
2021-11-03T19:05:09.1491764Z �[36;1mpython torch/testing/_check_kernel_launches.py |& tee "${GITHUB_WORKSPACE}"/cuda_kernel_launch_checks.txt�[0m
2021-11-03T19:05:09.1527621Z shell: /bin/bash -e {0}
2021-11-03T19:05:09.1528034Z env:
2021-11-03T19:05:09.1528646Z   pythonLocation: /opt/hostedtoolcache/Python/3.10.0/x64
2021-11-03T19:05:09.1529454Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib
2021-11-03T19:05:09.1530074Z ##[endgroup]
2021-11-03T19:05:09.1603908Z + python torch/testing/_check_kernel_launches.py
2021-11-03T19:05:09.1606419Z + tee /home/runner/work/pytorch/pytorch/cuda_kernel_launch_checks.txt
2021-11-03T19:05:09.1798135Z python: can't open file '/home/runner/work/pytorch/pytorch/torch/testing/_check_kernel_launches.py': [Errno 2] No such file or directory
2021-11-03T19:05:09.1865427Z ##[group]Run (! git --no-pager grep -I -no $'#include <cub/' --  ./aten  ':(exclude)aten/src/ATen/cuda/cub*.cuh' || (echo "The above files have direct cub include; please include ATen/cuda/cub.cuh instead and wrap your cub calls in at::native namespace if necessary"; false))
2021-11-03T19:05:09.1867416Z �[36;1m(! git --no-pager grep -I -no $'#include <cub/' --  ./aten  ':(exclude)aten/src/ATen/cuda/cub*.cuh' || (echo "The above files have direct cub include; please include ATen/cuda/cub.cuh instead and wrap your cub calls in at::native namespace if necessary"; false))�[0m
2021-11-03T19:05:09.1901009Z shell: /bin/bash -e {0}
2021-11-03T19:05:09.1901347Z env:
2021-11-03T19:05:09.1901851Z   pythonLocation: /opt/hostedtoolcache/Python/3.10.0/x64
2021-11-03T19:05:09.1902511Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib
2021-11-03T19:05:09.1903006Z ##[endgroup]
2021-11-03T19:05:09.2231981Z ##[group]Run (! git --no-pager grep -I -no $'cudaStreamSynchronize' --  ./aten ./c10 ':(exclude)aten/src/ATen/test' ':(exclude)c10/cuda/CUDAFunctions.h' || (echo "The above files call raw cuda APIs directly; please use at::cuda wrappers instead"; false))
2021-11-03T19:05:09.2234083Z �[36;1m(! git --no-pager grep -I -no $'cudaStreamSynchronize' --  ./aten ./c10 ':(exclude)aten/src/ATen/test' ':(exclude)c10/cuda/CUDAFunctions.h' || (echo "The above files call raw cuda APIs directly; please use at::cuda wrappers instead"; false))�[0m
2021-11-03T19:05:09.2270576Z shell: /bin/bash -e {0}

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.

makslevental pushed a commit that referenced this pull request Aug 9, 2021
ghstack-source-id: 38f68d1b2a5d8e8e76fffe6856737f5415ed77b3
Pull Request resolved: #62995

whoops forgot public impl
@makslevental makslevental changed the title refactor static runtime to expose useful liveness methods [Static runtime] refactor static runtime to expose useful liveness methods Aug 13, 2021
makslevental pushed a commit that referenced this pull request Sep 1, 2021
ghstack-source-id: 9056706843fcf3477831519964a49d039aaaf94f
Pull Request resolved: #62995

whoops forgot public impl

type liverange

add qol to liverange

move cmps to impl.h

fix cmps

refactor impl.cpp

refactor impl

put back live ranges into impl
@makslevental
Copy link
Contributor Author

LGTM. @hlu1, any specific Static Runtime test needs to be run here?

@hlu1 I have refactored this so that it is easier to review now. What do you think?

torch/csrc/jit/runtime/static/impl.cpp Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.h Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.h Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.h Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.cpp Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.cpp Outdated Show resolved Hide resolved
torch/csrc/jit/runtime/static/impl.cpp Outdated Show resolved Hide resolved
@makslevental
Copy link
Contributor Author

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

This was referenced Sep 20, 2021
@pytorch-probot
Copy link

pytorch-probot bot commented Nov 3, 2021

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/pytorch/pytorch/blob/3e5c052968ab092b7705b3bdf7284320d2fca17c/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-bionic-py3.6-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/xla ✅ triggered
linux-vulkan-bionic-py3.6-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3-clang5-mobile-build ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-dynamic ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-static ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile ✅ triggered
linux-xenial-py3.6-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers ✅ triggered
linux-xenial-py3.6-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx ✅ triggered
linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3.6-gcc7 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3.6-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/win ✅ triggered
Skipped Workflows
caffe2-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped
docker-builds ciflow/all 🚫 skipped
ios-12-5-1-arm64 ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-arm64-coreml ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-arm64-custom-ops ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-arm64-full-jit ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-arm64-metal ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-x86-64 ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-x86-64-coreml ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
ios-12-5-1-x86-64-full-jit ciflow/all, ciflow/ios, ciflow/macos 🚫 skipped
libtorch-linux-xenial-cuda10.2-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow 🚫 skipped
linux-xenial-py3-clang5-mobile-code-analysis ciflow/all, ciflow/linux, ciflow/mobile 🚫 skipped
parallelnative-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, 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.6-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped

You can add a comment to the PR and tag @pytorchbot with the following commands:
# ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun

# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow

For more information, please take a look at the CI Flow Wiki.

@makslevental
Copy link
Contributor Author

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

@facebook-github-bot
Copy link
Contributor

Hi @makslevental!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 21, 2022
@github-actions github-actions bot closed this Jun 20, 2022
@facebook-github-bot facebook-github-bot deleted the gh/makslevental/19/head branch July 21, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed oncall: jit Add this issue/PR to JIT oncall triage queue open source Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants