[kineto] Optimize getStepCallbacks for common case of no active callbacks#77804
[kineto] Optimize getStepCallbacks for common case of no active callbacks#77804swolchok wants to merge 3 commits intogh/swolchok/515/basefrom
Conversation
…acks IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)! [ghstack-poisoned]
🔗 Helpful links
✅ No Failures (0 Pending)As of commit 5199032 (more details on the Dr. CI page): Expand to see more💚 💚 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. |
…acks IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)! ghstack-source-id: 156733317 Pull Request resolved: #77804
…ctive callbacks" IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)! [ghstack-poisoned]
…acks Pull Request resolved: #77804 IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. ghstack-source-id: 156807323 Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)!
…ctive callbacks" IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)! [ghstack-poisoned]
…acks Pull Request resolved: #77804 IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. ghstack-source-id: 156848776 Differential Revision: [D36497279](https://our.internmc.facebook.com/intern/diff/D36497279/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36497279/)!
|
@pytorchbot merge |
|
Hey @swolchok. |
…acks (#77804) Summary: Pull Request resolved: #77804 IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector. Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/c083489f46e3885fbfc8888fd308e238bfcabfd6 Reviewed By: robieta Differential Revision: D36497279 Pulled By: swolchok fbshipit-source-id: ad574e318b8ae700cb3681f2d1d6b9ea8e325aab
Stack from ghstack (oldest at bottom):
IIUC, the result of this function will be empty and unused if there are no sampled callbacks, which is the common case. We can accelerate this case by wrapping the result in an optional to save initializing an empty SmallVector.
Differential Revision: D36497279
NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!