Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JustKnobs to TSC CUPTI Callback #947

Closed
wants to merge 1 commit into from

Conversation

sraikund16
Copy link
Contributor

Summary:
Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 12, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 12, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 13, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 14, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 14, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 14, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 14, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

sraikund16 added a commit to sraikund16/kineto that referenced this pull request Jun 17, 2024
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Reviewed By: aaronenyeshi

Differential Revision: D58485370
Summary:
Pull Request resolved: pytorch#947

Add JustKnobs so that we can turn TSC CUPTI Callback on and off. Since we need to meet open source compliance, we need to first add a default value of true in the Config class. In the FBConfig class we then add a method that checks the JK and overrides the default value of true. We also add a static variable to the CuptiActivityProfiler which will be overriden by the Config value upon initialization. Once this is set, the profiler as well as all headers will use the flag that was set by the JK. Using this flag we can essentially use the TSC timestamp or system clock via killswitch. Since the JK can run asynchronously across many initializations, wrap it in a try/catch.

On top of this change, ApproximateClock is moved from src/ to include/. This is because it is a forward facing header so it makes sense to expose it as a public header. Added also to the bazel file as a public header.

Reviewed By: aaronenyeshi

Differential Revision: D58485370
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 36c2a78.

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.

3 participants