This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
Ensure that async doesn't loop while sync is active (#1327) - #1327
Closed
ryanzhang22 wants to merge 1 commit into
Closed
ryanzhang22 wants to merge 1 commit into
ryanzhang22 wants to merge 1 commit into
Conversation
|
@ryanzhang22 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98011780. |
ryanzhang22
added a commit
to ryanzhang22/kineto
that referenced
this pull request
Mar 24, 2026
Summary: When an OD trace finishes, there's nothing preventing `performRunLoopStep` from continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also cause `performRunLoopStep` to transition as well. We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads. As always -- the big issue is that `isActive()` can represent either the sync and async paths, and we can't tell which one is active from this single boolean. Reviewed By: sanrise, divyanshk Differential Revision: D98011780
ryanzhang22
force-pushed
the
export-D98011780
branch
from
March 24, 2026 23:10
2147f57 to
8dc8fdf
Compare
ryanzhang22
added a commit
to ryanzhang22/kineto
that referenced
this pull request
Mar 24, 2026
Summary: Pull Request resolved: pytorch#1327 When an OD trace finishes, there's nothing preventing `performRunLoopStep` from continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also cause `performRunLoopStep` to transition as well. We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads. As always -- the big issue is that `isActive()` can represent either the sync and async paths, and we can't tell which one is active from this single boolean. Reviewed By: sanrise, divyanshk Differential Revision: D98011780
ryanzhang22
force-pushed
the
export-D98011780
branch
from
March 24, 2026 23:13
8dc8fdf to
2ae3337
Compare
ryanzhang22
added a commit
to ryanzhang22/kineto
that referenced
this pull request
Mar 24, 2026
Summary: When an OD trace finishes, there's nothing preventing `performRunLoopStep` from continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also cause `performRunLoopStep` to transition as well. We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads. As always -- the big issue is that `isActive()` can represent either the sync and async paths, and we can't tell which one is active from this single boolean. Reviewed By: sanrise, divyanshk Differential Revision: D98011780
ryanzhang22
force-pushed
the
export-D98011780
branch
from
March 24, 2026 23:16
2ae3337 to
d104c15
Compare
Summary: Pull Request resolved: pytorch#1327 When an OD trace finishes, there's nothing preventing `performRunLoopStep` from continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also cause `performRunLoopStep` to transition as well. We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads. As always -- the big issue is that `isActive()` can represent either the sync and async paths, and we can't tell which one is active from this single boolean. Reviewed By: sanrise, divyanshk Differential Revision: D98011780
ryanzhang22
force-pushed
the
export-D98011780
branch
from
March 24, 2026 23:19
d104c15 to
fc29184
Compare
|
This pull request has been merged in 37fada9. |
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Apr 2, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: #178918 Approved by: https://github.com/divyanshk
scotts
added a commit
to scotts/pytorch
that referenced
this pull request
Apr 3, 2026
Includes the following commits: - remove the rocprofiler early exit hack (pytorch/kineto#1329) 0c8ede0 - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude.
scotts
added a commit
to scotts/pytorch
that referenced
this pull request
Apr 6, 2026
Includes the following commits: - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude.
weifengpy
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Apr 7, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: #178918 Approved by: https://github.com/divyanshk
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Apr 7, 2026
Includes the following commits: - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude. Pull Request resolved: #179492 Approved by: https://github.com/ryanzhang22
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: pytorch#178918 Approved by: https://github.com/divyanshk
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
Includes the following commits: - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude. Pull Request resolved: pytorch#179492 Approved by: https://github.com/ryanzhang22
bobrenjc93
pushed a commit
to bobrenjc93/pytorch
that referenced
this pull request
Apr 10, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: pytorch#178918 Approved by: https://github.com/divyanshk
gplutop7
pushed a commit
to gplutop7/pytorch
that referenced
this pull request
Jul 15, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: pytorch#178918 Approved by: https://github.com/divyanshk
gplutop7
pushed a commit
to gplutop7/pytorch
that referenced
this pull request
Jul 15, 2026
Includes the following commits: - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude. Pull Request resolved: pytorch#179492 Approved by: https://github.com/ryanzhang22
ani300
pushed a commit
to IBM/kineto-spyre
that referenced
this pull request
Jul 28, 2026
Summary: Pull Request resolved: pytorch/kineto#1327 When an OD trace finishes, there's nothing preventing `performRunLoopStep` from continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also cause `performRunLoopStep` to transition as well. We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads. As always -- the big issue is that `isActive()` can represent either the sync and async paths, and we can't tell which one is active from this single boolean. Reviewed By: sanrise, divyanshk Differential Revision: D98011780 fbshipit-source-id: 749ab6b216631285913850a77fd35249b4232f0f Signed-off-by: Antoni Viros i Martin <[email protected]>
aws-kingrj
pushed a commit
to amazon-contributing/upstream-to-pytorch
that referenced
this pull request
Jul 29, 2026
Includes the following commits: * Expose occupany limiting factors (pytorch/kineto#1330) * remove the rocprofiler early exit hack (pytorch/kineto#1329) * Remove duplicate test ignore (pytorch/kineto#1328) * Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) * Add host_name to OSS Kineto trace metadata via gethostname() (pytorch/kineto#1323) * Revert D97166802 (pytorch/kineto#1326) * Fix Lingering INT32 Overflow (pytorch/kineto#1324) * Re-enabled some hardcoded tests (pytorch/kineto#1321) * Expose occupany limiting factors (pytorch/kineto#1322) Authored with Claude. Pull Request resolved: pytorch#178918 Approved by: https://github.com/divyanshk
aws-kingrj
pushed a commit
to amazon-contributing/upstream-to-pytorch
that referenced
this pull request
Jul 29, 2026
Includes the following commits: - Remove duplicate test ignore (pytorch/kineto#1328) 4826a43 - Ensure that async doesn't loop while sync is active (pytorch/kineto#1327) 37fada9 Authored with Claude. Pull Request resolved: pytorch#179492 Approved by: https://github.com/ryanzhang22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When an OD trace finishes, there's nothing preventing
performRunLoopStepfrom continuing to step. This can cause bad behavior if an auto-trace session starts and keeps driving state transitions that also causeperformRunLoopStepto transition as well.We have a bigger refactor coming to separate out these two trace modes which is a cleaner way to address this, however we need a short term solution too. For now we will block the async loop if we know that sync is active. It's easier for us to track the sync state because it's driven by the main profiler loop instead of background threads.
As always -- the big issue is that
isActive()can represent either the sync and async paths, and we can't tell which one is active from this single boolean.Reviewed By: sanrise, divyanshk
Differential Revision: D98011780