Bug Fix: GPU work load

dev
Steve L. Nyemba 5 years ago
parent 2b7b1757f9
commit 142491cf5b

@ -209,9 +209,10 @@ class Components :
logger.write({'module':'process','action':'read-partition','input':info['info']}) logger.write({'module':'process','action':'read-partition','input':info['info']})
df = pd.DataFrame(info['data']) df = pd.DataFrame(info['data'])
args = info['args'] args = info['args']
args['gpu'] = int(info['info']['partition']) MAX_GPUS = 8
if int(args['num_gpu']) > 1 and args['gpu'] > 0: args['gpu'] = int(info['info']['partition']) if info['info']['partition'] < MAX_GPUS else np.random.choice(np.arange(MAX_GPUS),1).astype(int).tolist()[0]
args['gpu'] = args['gpu'] + args['num_gpu'] if args['gpu'] + args['num_gpu'] < 8 else 0 #-- 8 max gpus # if int(args['num_gpu']) > 1 and args['gpu'] > 0:
# args['gpu'] = args['gpu'] + args['num_gpu'] if args['gpu'] + args['num_gpu'] < 8 else args['gpu'] #-- 8 max gpus
args['reader'] = lambda: df args['reader'] = lambda: df
# #
# @TODO: Fix # @TODO: Fix

Loading…
Cancel
Save