From 8bdfc5b58a8f971cd66a173d69239c2b4fb110e3 Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Mon, 30 Apr 2018 10:38:02 -0700 Subject: [PATCH] Request GPU only when num_gpus is positive --- tensorflowonspark/TFNode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflowonspark/TFNode.py b/tensorflowonspark/TFNode.py index 2997481e..0e94b75a 100755 --- a/tensorflowonspark/TFNode.py +++ b/tensorflowonspark/TFNode.py @@ -70,7 +70,7 @@ def start_cluster_server(ctx, num_gpus=1, rdma=False): cluster_spec = ctx.cluster_spec logging.info("{0}: Cluster spec: {1}".format(ctx.worker_num, cluster_spec)) - if tf.test.is_built_with_cuda(): + if tf.test.is_built_with_cuda() and num_gpus > 0: # GPU gpu_initialized = False retries = 3