Skip to content

Conversation

davidberard98
Copy link
Contributor

@davidberard98 davidberard98 commented Aug 6, 2024

Stack from ghstack (oldest at bottom):

I find myself occasionally trying to modify this to get additional debug info. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

Tested with a local DEBUG=1 build (which is needed to use TORCH_SHOW_DISPATCH_TRACE=1) and verified basic sanity - i.e. it still prints [call], etc.

Differential Revision: D60804331

I find myself occasionally trying to modify this to get additional debug. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 6, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/132717

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 9a1a1f6 with merge base 8705313 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@davidberard98
Copy link
Contributor Author

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

I find myself occasionally trying to modify this to get additional debug info. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

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

[ghstack-poisoned]
I find myself occasionally trying to modify this to get additional debug info. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

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

[ghstack-poisoned]
I find myself occasionally trying to modify this to get additional debug info. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

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

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request Aug 6, 2024
I find myself occasionally trying to modify this to get additional debug. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

ghstack-source-id: fc11af2
Pull Request resolved: #132717
@davidberard98
Copy link
Contributor Author

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

@davidberard98 davidberard98 marked this pull request as ready for review August 6, 2024 22:27
@davidberard98
Copy link
Contributor Author

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

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 7, 2024
I find myself occasionally trying to modify this to get additional debug info. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

Tested with a local DEBUG=1 build (which is needed to use `TORCH_SHOW_DISPATCH_TRACE=1`) and verified basic sanity - i.e. it still prints `[call]`, etc.

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

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request Aug 7, 2024
I find myself occasionally trying to modify this to get additional debug. Recompiling takes forever after modifying these lines, because the .h file is depended on by a huge number of files.

If we move this logic into a helper function and put it in the .cpp file, recompilation will be a lot faster when adding debug here.

ghstack-source-id: 7f4d2a3
Pull Request resolved: #132717
@davidberard98
Copy link
Contributor Author

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

@eellison eellison removed their request for review August 7, 2024 16:34
@davidberard98
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@davidberard98
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@bdhirsh
Copy link
Contributor

bdhirsh commented Aug 7, 2024

I find myself occasionally trying to modify this to get additional debug info

out of curiosity, what do you usually add? (is it worth committing it?)

@davidberard98
Copy link
Contributor Author

@bdhirsh For a kernel that was being dispatched with a PythonDispatcher key, I wanted to see what other keys were in the DispatchKeySet. It's kind of verbose if you have a lot of keys, so I'm not sure it would be worth adding as a default

@github-actions github-actions bot deleted the gh/davidberard98/323/head branch September 8, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants