-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into brendt/iso-tv-norm
- Loading branch information
Showing
8 changed files
with
83 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
|
||
# Determine which GPUs available for use and recommend CUDA_VISIBLE_DEVICES | ||
# setting if any are already in use. | ||
|
||
# pylint: disable=missing-module-docstring | ||
|
||
|
||
import GPUtil | ||
|
||
print("GPU utlizitation") | ||
GPUtil.showUtilization() | ||
|
||
devIDs = GPUtil.getAvailable( | ||
order="first", limit=65536, maxLoad=0.1, maxMemory=0.1, includeNan=False | ||
) | ||
|
||
Ngpu = len(GPUtil.getGPUs()) | ||
if len(devIDs) == Ngpu: | ||
print(f"All {Ngpu} GPUs available for use") | ||
else: | ||
print(f"Only {len(devIDs)} of {Ngpu} GPUs available for use") | ||
print("To avoid attempting to use GPUs already in use, run the command") | ||
print(f" export CUDA_VISIBLE_DEVICES={','.join(map(str, devIDs))}") |
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
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