Skip to content

Commit 46fae56

Browse files
committed
Allow user to choose how many GPUs to use for inference
1 parent aa043e1 commit 46fae56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project/lit_model_predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def main(args):
280280
args.profiler = args.profiler_method
281281
args.accelerator = 'dp' # Predict using Data Parallel (DP) and not Distributed Data Parallel (DDP) to avoid errors
282282
args.auto_select_gpus = args.auto_choose_gpus
283-
args.gpus = 1 # Enforce predictions to take place on a single GPU
283+
args.gpus = args.num_gpus # Allow user to choose how many GPUs to use for inference
284284
args.num_nodes = 1 # Enforce predictions to to take place on a single node
285285
args.precision = args.gpu_precision
286286
args.accumulate_grad_batches = args.accum_grad_batches

0 commit comments

Comments
 (0)