-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: #825 Make the Kineto profiler lazily initialize the CUPTI library. The following will change: - Only the legacy event profiler will register callbacks on RESOURCE_CONTEXT_CREATED and RESOURCE_CONTEXT_DESTROYED. - Move the initialization of profiler (libkineto::api().initProfilerIfRegistered()) to be lazy when prepare profiler is called, profilerStep is called, or during torch init pybinding (see D50894961). - Remove previous logic to init on fork (ie. ENABLE_KINETO_ON_FORK), also removing the use of calling pthread_atfork. - Unsubscribe the CUPTI Subscriber after teardown. - Clean up verbose logging Test Plan: CI Reviewed By: satgera Differential Revision: D50471345 Pulled By: aaronenyeshi fbshipit-source-id: 609f300c77c120ae94dcbcdf48d5720efec9e0e6
- Loading branch information
1 parent
33fdaad
commit 2cb8872
Showing
4 changed files
with
78 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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