mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-10 15:23:32 -07:00
basic hack for osx
This commit is contained in:
parent
0d19d8ec8e
commit
8aadbfef4a
3 changed files with 6 additions and 5 deletions
|
@ -46,7 +46,7 @@ class Devices(object):
|
|||
idx_mem = 0
|
||||
for device in self.devices:
|
||||
mem = device.total_mem
|
||||
if mem > idx_mem:
|
||||
if mem >= idx_mem:
|
||||
result = device
|
||||
idx_mem = mem
|
||||
return result
|
||||
|
@ -56,7 +56,7 @@ class Devices(object):
|
|||
idx_mem = sys.maxsize
|
||||
for device in self.devices:
|
||||
mem = device.total_mem
|
||||
if mem < idx_mem:
|
||||
if mem <= idx_mem:
|
||||
result = device
|
||||
idx_mem = mem
|
||||
return result
|
||||
|
@ -270,4 +270,4 @@ class Devices(object):
|
|||
os.environ[f'NN_DEVICE_{i}_TOTAL_MEM'] = str(device['total_mem'])
|
||||
os.environ[f'NN_DEVICE_{i}_FREE_MEM'] = str(device['free_mem'])
|
||||
os.environ[f'NN_DEVICE_{i}_CC'] = str(device['cc'])
|
||||
"""
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue