Add ACTIVITIES_DISABLE_EXTERNAL_CORRELATION to Kineto OD config#1245
Open
ryanzhang22 wants to merge 1 commit intopytorch:mainfrom
Open
Add ACTIVITIES_DISABLE_EXTERNAL_CORRELATION to Kineto OD config#1245ryanzhang22 wants to merge 1 commit intopytorch:mainfrom
ryanzhang22 wants to merge 1 commit intopytorch:mainfrom
Conversation
|
@ryanzhang22 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91512438. |
…rch#1245) Summary: This option is currently supported in Auto-trace under experimental_config -> disable_external_correlation. In this diff, we add support for this in the OD flow by popping EXTERNAL_CORRELATION from the activity types list if it's set to True. In the auto-trace flow, if disable_external_correlation is True, there is logic to stop pushing/popping correlation ids on [function enter/exit](https://www.internalfb.com/code/fbsource/[062f9c6489e6]/fbcode/caffe2/torch/csrc/profiler/collection.cpp?lines=346). However we don't currently explicitly remove this activity type. To align with OD logic introduced in the diff, in kineto_shim.cpp I also start popping EXTERNAL_CORRELATION from the activity type list. This should(?) be a no-op, because if EXTERNAL_CORRELATION is not in the activity list, then `externalCorrelationEnable_=False` in (x)ActivityApi and we will also not [push/pop correlation IDs](https://www.internalfb.com/code/fbsource/[51042021f958]/fbcode/kineto/libkineto/src/CuptiActivityApi.cpp?lines=69). The logic is the same, just in a different layer. Differential Revision: D91512438
1a47767 to
3053aee
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
This option is currently supported in Auto-trace under experimental_config -> disable_external_correlation. In this diff, we add support for this in the OD flow by popping EXTERNAL_CORRELATION from the activity types list if it's set to True.
In the auto-trace flow, if disable_external_correlation is True, there is logic to stop pushing/popping correlation ids on function enter/exit. However we don't currently explicitly remove this activity type. To align with OD logic introduced in the diff, in kineto_shim.cpp I also start popping EXTERNAL_CORRELATION from the activity type list. This should(?) be a no-op, because if EXTERNAL_CORRELATION is not in the activity list, then
externalCorrelationEnable_=Falsein (x)ActivityApi and we will also not push/pop correlation IDs. The logic is the same, just in a different layer.Differential Revision: D91512438