Skip to content

Conversation

@robieta
Copy link
Contributor

@robieta robieta commented Mar 29, 2022

Summary: So far as I can tell, recordThreadInfo only needs to be called once per thread. Once we have thread local subqueues we can easily manage this by simply calling it in the subqueue constructor.

Test Plan: The effect on single threaded overhead is pretty minimal, but it improves stress test overhead from ~6.1 us to ~1.4us since we're no contending over the lock in Kineto.

Reviewed By: chaekit

Differential Revision: D34811694

Summary: So far as I can tell, `recordThreadInfo` only needs to be called once per thread. Once we have thread local subqueues we can easily manage this by simply calling it in the subqueue constructor.

Test Plan: The effect on single threaded overhead is pretty minimal, but it improves stress test overhead from ~6.1 us to ~1.4us  since we're no contending over the lock in Kineto.

Reviewed By: chaekit

Differential Revision: D34811694

fbshipit-source-id: 93ebf67f8ec223944f8178c423e01c22fe17803f
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 29, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 32ad337 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34811694

facebook-github-bot pushed a commit that referenced this pull request Mar 29, 2022
Summary:
Pull Request resolved: #74888

So far as I can tell, `recordThreadInfo` only needs to be called once per thread. Once we have thread local subqueues we can easily manage this by simply calling it in the subqueue constructor.

Test Plan: The effect on single threaded overhead is pretty minimal, but it improves stress test overhead from ~6.1 us to ~1.4us  since we're no contending over the lock in Kineto.

Reviewed By: chaekit

Differential Revision: D34811694

fbshipit-source-id: da1047f7ae43af048773610a0f250fa514c67989
@github-actions
Copy link
Contributor

Hey @robieta.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants