Skip to content

Commit 25210b2

Browse files
authored
Merge pull request #276 from dratini6/master
Fixing an issue where parameter server always reserves 1 GPU as long as TensorFlow GPU build is used
2 parents 42bd62e + 8bdfc5b commit 25210b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflowonspark/TFNode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def start_cluster_server(ctx, num_gpus=1, rdma=False):
7070
cluster_spec = ctx.cluster_spec
7171
logging.info("{0}: Cluster spec: {1}".format(ctx.worker_num, cluster_spec))
7272

73-
if tf.test.is_built_with_cuda():
73+
if tf.test.is_built_with_cuda() and num_gpus > 0:
7474
# GPU
7575
gpu_initialized = False
7676
retries = 3

0 commit comments

Comments
 (0)