mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-14 00:53:48 -07:00
if you have multi GPU in a system, you can choose what GPU to use on model start
This commit is contained in:
parent
48d0123f0b
commit
bf5282f7ec
4 changed files with 32 additions and 8 deletions
|
@ -109,6 +109,17 @@ class devicelib:
|
|||
pass
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def getAllDevicesIdxsWithNamesList ():
|
||||
result = []
|
||||
try:
|
||||
nvmlInit()
|
||||
result = [ (i, nvmlDeviceGetName(nvmlDeviceGetHandleByIndex(i)).decode() ) for i in range(0, nvmlDeviceGetCount() ) ]
|
||||
nvmlShutdown()
|
||||
except:
|
||||
pass
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def getDeviceVRAMFree (idx):
|
||||
result = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue