{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17315","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17315/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17315/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17315/events","html_url":"https://github.com/tensorflow/tensorflow/issues/17315","id":300845304,"number":17315,"title":"feed_dict 10x slower on read-only numpy arrays","user":{"login":"yaroslavvb","id":23068,"avatar_url":"https://avatars3.githubusercontent.com/u/23068?v=4","gravatar_id":"","url":"https://api.github.com/users/yaroslavvb","html_url":"https://github.com/yaroslavvb","followers_url":"https://api.github.com/users/yaroslavvb/followers","following_url":"https://api.github.com/users/yaroslavvb/following{/other_user}","gists_url":"https://api.github.com/users/yaroslavvb/gists{/gist_id}","starred_url":"https://api.github.com/users/yaroslavvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaroslavvb/subscriptions","organizations_url":"https://api.github.com/users/yaroslavvb/orgs","repos_url":"https://api.github.com/users/yaroslavvb/repos","events_url":"https://api.github.com/users/yaroslavvb/events{/privacy}","received_events_url":"https://api.github.com/users/yaroslavvb/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":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T00:26:13Z","updated_at":"2018-03-20T10:19:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"There's a significant slowdown when feeding numpy arrays which are read-only. Looking at cpu profile, it looks like time is spent in memcpy (incorrectly reported as __nss_passwd_lookup). This memory copy seems unnnecessary\r\n\r\nIE,\r\n```\r\n# arr=64-byte aligned numpy array\r\nsess.run(some_op, feed_dict={a:arr})  # 12.6 GB/sec\r\narr.flags['WRITEABLE']=False\r\nsess.run(some_op, feed_dict={a:arr})  # 1.2 GB/sec\r\n```\r\n\r\n[tf_numpy_benchmark.py](https://github.com/diux-dev/cluster/blob/ee5c07056a9d1dadb118aaa93e721bc81a962428/yuxin_numpy/tf_numpy_benchmark.py)\r\n\r\n```\r\nwget -N https://raw.githubusercontent.com/diux-dev/cluster/ee5c07056a9d1dadb118aaa93e721bc81a962428/yuxin_numpy/tf_numpy_benchmark.py\r\npython tf_numpy_benchmark.py --benchmark=feed_cpu_tensor --allocator=tf --num-iters=51\r\nfeed_cpu_tensor               :  12.9 GB/sec, min:  7.75, median:  8.98, mean:  9.01\r\n\r\npython tf_numpy_benchmark.py --benchmark=feed_cpu_tensor --allocator=tf_readonly --num-iters=51\r\nfeed_cpu_tensor               :   1.1 GB/sec, min: 88.48, median: 91.55, mean: 93.30\r\n```\r\ncc @alextp"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/374545232","html_url":"https://github.com/tensorflow/tensorflow/issues/17315#issuecomment-374545232","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17315","id":374545232,"user":{"login":"tensorflowbutler","id":28546240,"avatar_url":"https://avatars2.githubusercontent.com/u/28546240?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflowbutler","html_url":"https://github.com/tensorflowbutler","followers_url":"https://api.github.com/users/tensorflowbutler/followers","following_url":"https://api.github.com/users/tensorflowbutler/following{/other_user}","gists_url":"https://api.github.com/users/tensorflowbutler/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflowbutler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflowbutler/subscriptions","organizations_url":"https://api.github.com/users/tensorflowbutler/orgs","repos_url":"https://api.github.com/users/tensorflowbutler/repos","events_url":"https://api.github.com/users/tensorflowbutler/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflowbutler/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T10:19:50Z","updated_at":"2018-03-20T10:19:50Z","author_association":"MEMBER","body":"Nagging Awaiting Response: It has been 14 days with no activityand the `awaiting response` label was assigned. Is this still an issue?"}}
{"actor":{"display_login":"tensorflowbutler"}}