nnlib initialization: fix choosing best gpu when indexes of gpu are different in tf and nvsmi
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ NLayerDiscriminator = nnlib.NLayerDiscriminator
|
|||||||
else:
|
else:
|
||||||
config = tf.ConfigProto()
|
config = tf.ConfigProto()
|
||||||
|
|
||||||
if device_config.backend != "tensorflow-generic":
|
if device_config.force_gpu_idx != -1 and device_config.backend != "tensorflow-generic":
|
||||||
#tensorflow-generic is system with NVIDIA card, but w/o NVSMI
|
#tensorflow-generic is system with NVIDIA card, but w/o NVSMI
|
||||||
#so dont hide devices and let tensorflow to choose best card
|
#so dont hide devices and let tensorflow to choose best card
|
||||||
visible_device_list = ''
|
visible_device_list = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user