-
Notifications
You must be signed in to change notification settings - Fork 25.2k
add nesting to TORCH_SHOW_DISPATCH_TRACE #87751
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87751
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b29ab2c: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Added indents to `TORCH_SHOW_DISPATCH_TRACE` so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under the `DEBUG` build. Example output: I know we have the PyDispatcher now, but I still found this helpful for debugging ``` [call] op=[aten::ones], key=[BackendSelect] [redispatch] op=[aten::ones], key=[CPU] [call] op=[aten::empty.memory_format], key=[BackendSelect] [redispatch] op=[aten::empty.memory_format], key=[CPU] [call] op=[aten::fill_.Scalar], key=[CPU] [call] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[AutogradCPU] [redispatch] op=[aten::view], key=[ADInplaceOrView] [redispatch] op=[aten::view], key=[Functionalize] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Meta] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Python] [callBoxed] op=[aten::view], key=[CPU] [call] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[Functionalize] [callBoxed] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[Python] [callBoxed] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] ``` [ghstack-poisoned]
Added indents to `TORCH_SHOW_DISPATCH_TRACE` so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under the `DEBUG` build. Example output: I know we have the PyDispatcher now, but I still found this helpful for debugging ``` [call] op=[aten::ones], key=[BackendSelect] [redispatch] op=[aten::ones], key=[CPU] [call] op=[aten::empty.memory_format], key=[BackendSelect] [redispatch] op=[aten::empty.memory_format], key=[CPU] [call] op=[aten::fill_.Scalar], key=[CPU] [call] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[AutogradCPU] [redispatch] op=[aten::view], key=[ADInplaceOrView] [redispatch] op=[aten::view], key=[Functionalize] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Meta] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Python] [callBoxed] op=[aten::view], key=[CPU] [call] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[Functionalize] [callBoxed] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[Python] [callBoxed] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] ``` [ghstack-poisoned]
Added indents to `TORCH_SHOW_DISPATCH_TRACE` so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under the `DEBUG` build. Example output: I know we have the PyDispatcher now, but I still found this helpful for debugging ``` [call] op=[aten::ones], key=[BackendSelect] [redispatch] op=[aten::ones], key=[CPU] [call] op=[aten::empty.memory_format], key=[BackendSelect] [redispatch] op=[aten::empty.memory_format], key=[CPU] [call] op=[aten::fill_.Scalar], key=[CPU] [call] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[AutogradCPU] [redispatch] op=[aten::view], key=[ADInplaceOrView] [redispatch] op=[aten::view], key=[Functionalize] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Meta] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Python] [callBoxed] op=[aten::view], key=[CPU] [call] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[Functionalize] [callBoxed] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[Python] [callBoxed] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] ``` [ghstack-poisoned]
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Added indents to `TORCH_SHOW_DISPATCH_TRACE` so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under the `DEBUG` build. Example output: I know we have the PyDispatcher now, but I still found this helpful for debugging ``` [call] op=[aten::ones], key=[BackendSelect] [redispatch] op=[aten::ones], key=[CPU] [call] op=[aten::empty.memory_format], key=[BackendSelect] [redispatch] op=[aten::empty.memory_format], key=[CPU] [call] op=[aten::fill_.Scalar], key=[CPU] [call] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[AutogradCPU] [redispatch] op=[aten::view], key=[ADInplaceOrView] [redispatch] op=[aten::view], key=[Functionalize] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Meta] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Python] [callBoxed] op=[aten::view], key=[CPU] [call] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[Functionalize] [callBoxed] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[Python] [callBoxed] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] ``` Pull Request resolved: pytorch#87751 Approved by: https://github.com/ezyang, https://github.com/zou3519
Added indents to `TORCH_SHOW_DISPATCH_TRACE` so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under the `DEBUG` build. Example output: I know we have the PyDispatcher now, but I still found this helpful for debugging ``` [call] op=[aten::ones], key=[BackendSelect] [redispatch] op=[aten::ones], key=[CPU] [call] op=[aten::empty.memory_format], key=[BackendSelect] [redispatch] op=[aten::empty.memory_format], key=[CPU] [call] op=[aten::fill_.Scalar], key=[CPU] [call] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[AutogradCPU] [redispatch] op=[aten::view], key=[ADInplaceOrView] [redispatch] op=[aten::view], key=[Functionalize] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Meta] [call] op=[aten::view], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::view], key=[Python] [callBoxed] op=[aten::view], key=[CPU] [call] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[AutogradCPU] [redispatch] op=[aten::clone], key=[Functionalize] [callBoxed] op=[aten::clone], key=[PythonTLSSnapshot] [redispatchBoxed] op=[aten::clone], key=[Python] [callBoxed] op=[aten::clone], key=[CPU] [call] op=[aten::empty_strided], key=[BackendSelect] [redispatch] op=[aten::empty_strided], key=[CPU] [call] op=[aten::copy_], key=[CPU] ``` Pull Request resolved: pytorch#87751 Approved by: https://github.com/ezyang, https://github.com/zou3519
Added indents to
TORCH_SHOW_DISPATCH_TRACE
so that you more easily see the call tree from the dispatcher. Definitely slower, but it's all guarded under theDEBUG
build. Example output:I know we have the PyDispatcher now, but I still found this helpful for debugging
Stack from ghstack (oldest at bottom):