-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Call nvmlInit() and nvmlShutdown() only once (#54)
Lots of time is spent on nvmlInit() and nvmlShutdown() for each new_query call. When running in a loop mode (-i), we do not need to initialize and shutdown the nvml library because nvml APIs will be used throughout the lifespan of the gpustat process. Upon importing `gpustat.pynvml`, nvmlInit() will always be called.
- Loading branch information
Showing
3 changed files
with
32 additions
and
10 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