{"action":"created","issue":{"url":"https://api.github.com/repos/weiliu89/caffe/issues/621","repository_url":"https://api.github.com/repos/weiliu89/caffe","labels_url":"https://api.github.com/repos/weiliu89/caffe/issues/621/labels{/name}","comments_url":"https://api.github.com/repos/weiliu89/caffe/issues/621/comments","events_url":"https://api.github.com/repos/weiliu89/caffe/issues/621/events","html_url":"https://github.com/weiliu89/caffe/issues/621","id":231785083,"number":621,"title":"Slow forward pass in C++ API","user":{"login":"pkdogcom","id":10513430,"avatar_url":"https://avatars1.githubusercontent.com/u/10513430?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdogcom","html_url":"https://github.com/pkdogcom","followers_url":"https://api.github.com/users/pkdogcom/followers","following_url":"https://api.github.com/users/pkdogcom/following{/other_user}","gists_url":"https://api.github.com/users/pkdogcom/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdogcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdogcom/subscriptions","organizations_url":"https://api.github.com/users/pkdogcom/orgs","repos_url":"https://api.github.com/users/pkdogcom/repos","events_url":"https://api.github.com/users/pkdogcom/events{/privacy}","received_events_url":"https://api.github.com/users/pkdogcom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-27T08:06:32Z","updated_at":"2017-06-08T17:15:19Z","closed_at":null,"body":"I notice a huge difference between pure GPU speed (measured by 'caffe time') and the C++ API. My GPU is 1080ti and the GPU time for forward pass is around 25ms for the 512ft model, while if I measure the time of C++ API forward pass as follows: \r\n`  high_resolution_clock::time_point  t1 = high_resolution_clock::now(); \r\n    net_->Forward();\r\n    auto duration = duration_cast<milliseconds>( high_resolution_clock::now() - t1 ).count();\r\n    std::cout << \"C++ API Forward time \" << duration << \"ms \" << std::endl;`\r\nit's consistently around 80ms after the first few warm up runs. \r\n\r\nI used the exact same fork of caffe to run the original caffe classification example with either the reference caffenet model or the base reduced VGG 16 model used by SSD, and the time difference between C++ API and GPU code is negligible. I was wondering if there is anything in the SSD model which slows down only when invoked by C++ API? "},"comment":{"url":"https://api.github.com/repos/weiliu89/caffe/issues/comments/307168793","html_url":"https://github.com/weiliu89/caffe/issues/621#issuecomment-307168793","issue_url":"https://api.github.com/repos/weiliu89/caffe/issues/621","id":307168793,"user":{"login":"weiliu89","id":1066700,"avatar_url":"https://avatars3.githubusercontent.com/u/1066700?v=3","gravatar_id":"","url":"https://api.github.com/users/weiliu89","html_url":"https://github.com/weiliu89","followers_url":"https://api.github.com/users/weiliu89/followers","following_url":"https://api.github.com/users/weiliu89/following{/other_user}","gists_url":"https://api.github.com/users/weiliu89/gists{/gist_id}","starred_url":"https://api.github.com/users/weiliu89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiliu89/subscriptions","organizations_url":"https://api.github.com/users/weiliu89/orgs","repos_url":"https://api.github.com/users/weiliu89/repos","events_url":"https://api.github.com/users/weiliu89/events{/privacy}","received_events_url":"https://api.github.com/users/weiliu89/received_events","type":"User","site_admin":false},"created_at":"2017-06-08T17:15:19Z","updated_at":"2017-06-08T17:15:19Z","body":"I don't know. Let me know what is your finding. How about just using LOG(INFO) to print message before and after the Forward() function?"}}
{"actor":{"display_login":"weiliu89"}}