Skip to content

Conversation

@tchaton
Copy link
Contributor

@tchaton tchaton commented Mar 1, 2021

What does this PR do?

This PR resolve a bug with PyTorch Profiler and emit_nvtx.

nvprof --profile-from-start off -o trace_name.prof -- pytest tests/trainer/test_trainer.py::test_pytorch_profiler_nested_emit_nvtx

python -c "import torch;print(torch.autograd.profiler.load_nvprof('/home/ubuntu/pytorch-lightning/trace_name.prof'))"

Screenshot 2021-03-01 at 13 56 36

Fixes #6153

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton added this to the 1.2.x milestone Mar 1, 2021
@tchaton tchaton self-assigned this Mar 1, 2021
@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #6260 (1f0365c) into master (b6aa350) will decrease coverage by 2%.
The diff coverage is 62%.

@@           Coverage Diff           @@
##           master   #6260    +/-   ##
=======================================
- Coverage      93%     91%    -2%     
=======================================
  Files         161     161            
  Lines       11457   11463     +6     
=======================================
- Hits        10692   10485   -207     
- Misses        765     978   +213     

@carmocca carmocca added ready PRs ready to be merged bug Something isn't working labels Mar 1, 2021
@carmocca carmocca mentioned this pull request Mar 1, 2021
@mergify mergify bot added the has conflicts label Mar 2, 2021
@pep8speaks
Copy link

pep8speaks commented Mar 2, 2021

Hello @tchaton! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-03-05 16:14:44 UTC

@mergify mergify bot removed the has conflicts label Mar 2, 2021
@mergify mergify bot removed the has conflicts label Mar 3, 2021
@mergify mergify bot added the has conflicts label Mar 5, 2021
@mergify mergify bot removed the has conflicts label Mar 5, 2021
@tchaton tchaton merged commit 2ec67a4 into master Mar 5, 2021
@tchaton tchaton deleted the bugfix_6153 branch March 5, 2021 20:12
tchaton added a commit that referenced this pull request Mar 9, 2021
* resolve bug

* update changelog

* Update tests/trainer/test_trainer.py

* Update pytorch_lightning/profiler/profilers.py

Co-authored-by: Jirka Borovec <[email protected]>

* resolve comments

* resolve flake8

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
Borda added a commit that referenced this pull request Mar 9, 2021
* resolve bug

* update changelog

* Update tests/trainer/test_trainer.py

* Update pytorch_lightning/profiler/profilers.py

Co-authored-by: Jirka Borovec <[email protected]>

* resolve comments

* resolve flake8

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
tchaton added a commit that referenced this pull request Mar 9, 2021
* resolve bug

* update changelog

* Update tests/trainer/test_trainer.py

* Update pytorch_lightning/profiler/profilers.py

Co-authored-by: Jirka Borovec <[email protected]>

* resolve comments

* resolve flake8

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
tchaton added a commit that referenced this pull request Mar 9, 2021
* resolve bug

* update changelog

* Update tests/trainer/test_trainer.py

* Update pytorch_lightning/profiler/profilers.py

Co-authored-by: Jirka Borovec <[email protected]>

* resolve comments

* resolve flake8

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
lexierule pushed a commit that referenced this pull request Mar 9, 2021
* resolve bug

* update changelog

* Update tests/trainer/test_trainer.py

* Update pytorch_lightning/profiler/profilers.py

Co-authored-by: Jirka Borovec <[email protected]>

* resolve comments

* resolve flake8

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyTorchProfiler crashes when emit_nvtx=True

5 participants