From 8129d461212adba4ac82494cd1af34dbacc93e1e Mon Sep 17 00:00:00 2001 From: Newnius Date: Tue, 26 May 2020 00:21:28 +0800 Subject: [PATCH] bugfix --- src/resource_pool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resource_pool.go b/src/resource_pool.go index 844df13..90f270f 100644 --- a/src/resource_pool.go +++ b/src/resource_pool.go @@ -536,8 +536,9 @@ func (pool *ResourcePool) detach(GPU string, job Job) { } } +/* return free & using GPUs */ func (pool *ResourcePool) countGPU() (int, int) { - return pool.TotalGPU - pool.UsingGPU, pool.TotalGPU + return pool.TotalGPU - pool.UsingGPU, pool.UsingGPU } func (pool *ResourcePool) getBindings() map[string]map[string]int {