Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Oct 3, 2022

Stack from ghstack (oldest at bottom):

I used this to debug #86136 so it is useful. The implementation is not so fast so it is not enabled by default.

Signed-off-by: Edward Z. Yang ezyang@fb.com

I used this to debug #86136
so it is useful.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 3, 2022

🔗 Helpful Links

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

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

✅ No Failures

As of commit 0f92a15:
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 3, 2022
…ory"


I used this to debug #86136 so it is useful. The implementation is not so fast so it is not enabled by default.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

[ghstack-poisoned]
Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful, but the cost of Python (2 us) vs C++ stack tracing (however long it takes to to string format and gather a stack trace) is not on the same order of magnitude. It is done on every allocation so it happens a lot. This can lead people to think that enabling this for long running jobs is more expensive than it is (Python is pretty cheap), or for someone to think this is cheap but severely slow down the job they are looking at.

Maybe either warn that C++ stack traces are slow, or change the api to enable them to be more clear _enable_expensive_memory_history. There is probably a cheaper approach that walks the C++ stack and saves the addresses but does not formatting that can enable fast gathering of C++ stack traces in the future.

…ory"


I used this to debug #86136 so it is useful. The implementation is not so fast so it is not enabled by default.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

[ghstack-poisoned]
@ezyang
Copy link
Contributor Author

ezyang commented Oct 3, 2022

I made it guarded behind a scary looking kwarg, and also added a docblock for the function!

ezyang added a commit that referenced this pull request Oct 3, 2022
I used this to debug #86136
so it is useful.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

ghstack-source-id: 408d088
Pull Request resolved: #86145
@ezyang
Copy link
Contributor Author

ezyang commented Oct 3, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered without a flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot.

@ezyang
Copy link
Contributor Author

ezyang commented Oct 6, 2022

@pytorchbot merge -f "all ready"

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the force (-f) flag. This means your change will be merged immediately, bypassing any CI checks (ETA: 1-5 minutes). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

Hey @ezyang.
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 pushed a commit that referenced this pull request Oct 7, 2022
#86145)

Summary:
I used this to debug #86136 so it is useful. The implementation is not so fast so it is not enabled by default.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Pull Request resolved: #86145
Approved by: https://github.com/albanD, https://github.com/zdevito

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/adf5919720c02dcf8c1ff32c890dd1c4e54d6fe7

Reviewed By: seemethere

Differential Revision: D40167039

Pulled By: seemethere

fbshipit-source-id: eaff41815b4dfc280dae266b375950cc5a20064a
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1451/head branch June 8, 2023 16:25
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 cla signed Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants