Exit with failure if a free gpu is not found by parallel_gpu_execute.
authorMichael Case <mikecase@google.com>
Fri, 2 Mar 2018 23:52:32 +0000 (15:52 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 2 Mar 2018 23:56:28 +0000 (15:56 -0800)
If TF_GPU_COUNT was a value greater than the actual number of GPUs, it was
possible for tests to just pass without running when running under
parallel_gpu_execute.sh.

PiperOrigin-RevId: 187681032

tensorflow/tools/ci_build/gpu_build/parallel_gpu_execute.sh

index cfeaebd..d0816c9 100755 (executable)
@@ -54,3 +54,6 @@ for i in `seq 0 $((TF_GPU_COUNT-1))`; do
   fi
 done
 
+echo "Cannot find a free GPU to run the test $* on, exiting with failure..."
+exit 1
+