{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18861","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18861/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18861/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18861/events","html_url":"https://github.com/tensorflow/tensorflow/issues/18861","id":317612081,"number":18861,"title":"Running two Models in two GPUs for prediction in c++","user":{"login":"kerolos","id":3300016,"avatar_url":"https://avatars0.githubusercontent.com/u/3300016?v=4","gravatar_id":"","url":"https://api.github.com/users/kerolos","html_url":"https://github.com/kerolos","followers_url":"https://api.github.com/users/kerolos/followers","following_url":"https://api.github.com/users/kerolos/following{/other_user}","gists_url":"https://api.github.com/users/kerolos/gists{/gist_id}","starred_url":"https://api.github.com/users/kerolos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerolos/subscriptions","organizations_url":"https://api.github.com/users/kerolos/orgs","repos_url":"https://api.github.com/users/kerolos/repos","events_url":"https://api.github.com/users/kerolos/events{/privacy}","received_events_url":"https://api.github.com/users/kerolos/received_events","type":"User","site_admin":false},"labels":[{"id":386191887,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response","name":"stat:awaiting response","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"yifeif","id":1192265,"avatar_url":"https://avatars3.githubusercontent.com/u/1192265?v=4","gravatar_id":"","url":"https://api.github.com/users/yifeif","html_url":"https://github.com/yifeif","followers_url":"https://api.github.com/users/yifeif/followers","following_url":"https://api.github.com/users/yifeif/following{/other_user}","gists_url":"https://api.github.com/users/yifeif/gists{/gist_id}","starred_url":"https://api.github.com/users/yifeif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifeif/subscriptions","organizations_url":"https://api.github.com/users/yifeif/orgs","repos_url":"https://api.github.com/users/yifeif/repos","events_url":"https://api.github.com/users/yifeif/events{/privacy}","received_events_url":"https://api.github.com/users/yifeif/received_events","type":"User","site_admin":false},"assignees":[{"login":"yifeif","id":1192265,"avatar_url":"https://avatars3.githubusercontent.com/u/1192265?v=4","gravatar_id":"","url":"https://api.github.com/users/yifeif","html_url":"https://github.com/yifeif","followers_url":"https://api.github.com/users/yifeif/followers","following_url":"https://api.github.com/users/yifeif/following{/other_user}","gists_url":"https://api.github.com/users/yifeif/gists{/gist_id}","starred_url":"https://api.github.com/users/yifeif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifeif/subscriptions","organizations_url":"https://api.github.com/users/yifeif/orgs","repos_url":"https://api.github.com/users/yifeif/repos","events_url":"https://api.github.com/users/yifeif/events{/privacy}","received_events_url":"https://api.github.com/users/yifeif/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-04-25T12:45:02Z","updated_at":"2018-05-05T19:41:53Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n- **Have I written custom code  (as opposed to using a stock example script provided in TensorFlow): N/A\r\n- **OS Platform and Distribution (e.g., Debian 9.1):\r\n- **TensorFlow installed from (source bazel):\r\n- **TensorFlow version (use command below) 1.7:\r\n- **Python version 3.6: \r\n- **Bazel version (if compiling from source) 0.11:\r\n- **GCC/Compiler version (if compiling from source GCC)6.3:\r\n- **CUDA/cuDNN version 9.1. cudnn 7.1:\r\n- **GPU model and memory 2 GPU GTX 1080 TI, 11GB:\r\n- **Exact command to reproduce: compiling by c++  \r\n\r\n\r\n### Describe the problem\r\n   i would like to use two gpus at the same time for make a preduction of two models by using this of code: session_options.config.mutable_gpu_options()->set_visible_device_list(\"0\"); unfortunatlly i got this error (Invalid allocator type: 0):\r\n2018-04-25 14:35:17.895671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0\r\n2018-04-25 14:35:17.895717: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:\r\n2018-04-25 14:35:17.895722: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917]      0 \r\n2018-04-25 14:35:17.895727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0:   N \r\n2018-04-25 14:35:17.895961: E tensorflow/core/common_runtime/gpu/process_state.cc:125] Invalid allocator type: 0\r\n2018-04-25 14:35:17.895977: E tensorflow/core/common_runtime/direct_session.cc:167] Internal: Failed to get memory allocator for TF GPU 0 with 10913103872 bytes of memory.\r\n\r\n### Source code / logs\r\n    session_options.config.mutable_gpu_options()->set_visible_device_list(\"0\");   --->error is here\r\n    session_options.config.mutable_gpu_options()->set_allow_growth(true);\r\n    session.reset(tensorflow::NewSession(tensorflow::SessionOptions(session_options)));\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/386829946","html_url":"https://github.com/tensorflow/tensorflow/issues/18861#issuecomment-386829946","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18861","id":386829946,"user":{"login":"rundembear","id":7693798,"avatar_url":"https://avatars0.githubusercontent.com/u/7693798?v=4","gravatar_id":"","url":"https://api.github.com/users/rundembear","html_url":"https://github.com/rundembear","followers_url":"https://api.github.com/users/rundembear/followers","following_url":"https://api.github.com/users/rundembear/following{/other_user}","gists_url":"https://api.github.com/users/rundembear/gists{/gist_id}","starred_url":"https://api.github.com/users/rundembear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rundembear/subscriptions","organizations_url":"https://api.github.com/users/rundembear/orgs","repos_url":"https://api.github.com/users/rundembear/repos","events_url":"https://api.github.com/users/rundembear/events{/privacy}","received_events_url":"https://api.github.com/users/rundembear/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T19:41:53Z","updated_at":"2018-05-05T19:41:53Z","author_association":"NONE","body":"I entered a separate ticket for this, sorry, should have had this link in my comment. This is via python, but it is, I believe, the same mechanism. I am trying to do this with multiple copies of the same model, but still essentially the same issue. This includes a very small code snippet which runs fine on 1.3 and 1.5. and crashes from 1.6 onwards.\r\n\r\nhttps://github.com/tensorflow/tensorflow/issues/19083\r\n\r\n\r\nimport tensorflow as tf\r\nG =tf.Graph()\r\nsess1 = tf.Session(graph=G, config=tf.ConfigProto(log_device_placement=False,gpu_options=tf.GPUOptions(allow_growth=True,visible_device_list='0')))\r\nsess2 = tf.Session(graph=G, config=tf.ConfigProto(log_device_placement=False,gpu_options=tf.GPUOptions(allow_growth=True,visible_device_list='1')))\r\n"}}
{"actor":{"display_login":"rundembear"}}