round created_vram_gb to nearest value.

This commit is contained in:
iperov 2018-12-06 09:32:28 +04:00
parent 52f2be80d7
commit f90b2d231b

View file

@ -204,7 +204,7 @@ def getDeviceVRAMTotalGb (idx):
memInfo = nvmlDeviceGetMemoryInfo( handle ) memInfo = nvmlDeviceGetMemoryInfo( handle )
result = memInfo.total / (1024*1024*1024) result = memInfo.total / (1024*1024*1024)
nvmlShutdown() nvmlShutdown()
return result return round(result)
def getBestDeviceIdx(): def getBestDeviceIdx():
nvmlInit() nvmlInit()