{"action":"closed","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/4543","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/4543/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/4543/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/4543/events","html_url":"https://github.com/apache/incubator-mxnet/issues/4543","id":198940074,"number":4543,"title":"Can't use multi-core CPU correctly!","user":{"login":"dytmas","id":8529987,"avatar_url":"https://avatars1.githubusercontent.com/u/8529987?v=4","gravatar_id":"","url":"https://api.github.com/users/dytmas","html_url":"https://github.com/dytmas","followers_url":"https://api.github.com/users/dytmas/followers","following_url":"https://api.github.com/users/dytmas/following{/other_user}","gists_url":"https://api.github.com/users/dytmas/gists{/gist_id}","starred_url":"https://api.github.com/users/dytmas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dytmas/subscriptions","organizations_url":"https://api.github.com/users/dytmas/orgs","repos_url":"https://api.github.com/users/dytmas/repos","events_url":"https://api.github.com/users/dytmas/events{/privacy}","received_events_url":"https://api.github.com/users/dytmas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-05T12:00:39Z","updated_at":"2017-09-28T07:21:00Z","closed_at":"2017-09-28T07:21:00Z","author_association":"NONE","body":"Run on CPU with openblas and openmp.\r\n\r\nRun the following code:\r\n```\r\nimport time, os\r\n\r\ndef do(x, n):\r\n    return [mx.nd.dot(x,x) for i in range(n)]\r\n\r\ndef wait(x):\r\n    for y in x:\r\n        y.wait_to_read()\r\n        \r\ntic = time.time()\r\na = mx.nd.ones((1000, 1000))\r\nb = do(a, 1000)\r\nprint('time for pushed into backend engine:\\n %f sec' % (time.time()-tic))\r\nwait(b)\r\nprint('time for all finished:\\n %f sec' % (time.time()-tic))\r\n```\r\n\r\n\r\nwhen OMP_NUM_THREADS = 4, it will take about 8-9s.\r\nbut when OMP_NUM_THREADS = 32, it will take about 28-32s.\r\n\r\nI have checked and I am sure that when OMP_NUM_THREADS = 4,  4 cores are filled, when OMP_NUM_THREADS = 32, 32 cores are filled .\r\n\r\nwhen I set a = mx.nd.ones((10000, 10000))\r\n32 cores will be faster than 4 cores, but only about 2 times faster.\r\n\r\nwhy mxnet or openblas can't use the power of multi-core cpu, in such a simple situation?\r\n"}}
{"actor":{"display_login":"yajiedesign"}}