Add warning for clearing profiler events at the end of each cycle#168066
Add warning for clearing profiler events at the end of each cycle#168066jiannanWang wants to merge 10 commits intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/168066
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 44600b2 with merge base 28e8803 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: profiler" |
|
@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 |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-jammy-cuda12.8-py3.10-gcc11 / test (default, 3, 5, linux.g6.4xlarge.experimental.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@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 |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-jammy-cuda12.8-py3.10-gcc11 / test (default, 3, 5, linux.g6.4xlarge.experimental.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot drci |
|
@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 |
…68066) Fixes #148314. This PR introduces a warning to clarify the behavior of the Profiler regarding event management. Specifically, it informs users that: - The Profiler clears events at the end of each cycle. - Only events from the current cycle will be reported by default. - To retain events across cycles, users should set `acc_events=True`. The warning is triggered only once when `self.profiler` is not `None` and `self.acc_events` is `False`, using the `warn_once` function. This change aims to improve transparency and help users avoid confusion when analyzing profiling results. Pull Request resolved: #168066 Approved by: https://github.com/sraikund16
Fixes #148314.
This PR introduces a warning to clarify the behavior of the Profiler regarding event management. Specifically, it informs users that:
acc_events=True.The warning is triggered only once when
self.profileris notNoneandself.acc_eventsisFalse, using thewarn_oncefunction.This change aims to improve transparency and help users avoid confusion when analyzing profiling results.