Having struggled with the same issue. The tpuEstimator uses only the 1st GPU, and I have tried multiples including os.environ["CUDA_VISIBLE_DEVICES"]="0,1,2,3" or config = tf.ConfigProto() config.gpu_options.allow_growth = True config.gpu_options.visible_device_list = '1' config.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1 and add "session_config=config" in "tf.contrib.tpu.RunConfig" None of these worked. Desperately in need of help!
2条答案
按热度按时间w8ntj3qf1#
Having struggled with the same issue. The tpuEstimator uses only the 1st GPU, and I have tried multiples including
os.environ["CUDA_VISIBLE_DEVICES"]="0,1,2,3"
or
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.gpu_options.visible_device_list = '1'
config.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1
and add "session_config=config" in "tf.contrib.tpu.RunConfig"
None of these worked. Desperately in need of help!
jchrr9hc2#
刚刚发现第二个解决方案实际上是有效的,之前我还有一个死掉的内存中的会话,它给我报错了。以下应该可以工作: