diff --git a/lib/utils/subprocess.py b/lib/utils/subprocess.py
index 42b3f177..544cabb5 100644
--- a/lib/utils/subprocess.py
+++ b/lib/utils/subprocess.py
@@ -61,7 +61,7 @@ def process_in_parallel(
         assert -1 not in gpu_inds, \
             'Hiding GPU indices using the \'-1\' index is not supported'
     else:
-        gpu_inds = range(cfg.NUM_GPUS)
+        gpu_inds = range(NUM_GPUS)
     gpu_inds = list(gpu_inds)
     # Run the binary in cfg.NUM_GPUS subprocesses
     for i, gpu_ind in enumerate(gpu_inds):