{"action":"created","comment":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/comments/54657188","id":54657188,"diff_hunk":"@@ -149,6 +149,10 @@ class Caffe {\n   static void SetDevice(const int device_id);\n   // Prints the current GPU status.\n   static void DeviceQuery();\n+  // Check if specified device is available\n+  static bool CheckDevice(const int device_id);\n+  // Get the first available device id since start_id","path":"include/caffe/common.hpp","position":6,"original_position":6,"commit_id":"45bde08ef7601215b61616af47d97906c6824526","original_commit_id":"45bde08ef7601215b61616af47d97906c6824526","user":{"login":"longjon","id":940817,"avatar_url":"https://avatars.githubusercontent.com/u/940817?v=3","gravatar_id":"","url":"https://api.github.com/users/longjon","html_url":"https://github.com/longjon","followers_url":"https://api.github.com/users/longjon/followers","following_url":"https://api.github.com/users/longjon/following{/other_user}","gists_url":"https://api.github.com/users/longjon/gists{/gist_id}","starred_url":"https://api.github.com/users/longjon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/longjon/subscriptions","organizations_url":"https://api.github.com/users/longjon/orgs","repos_url":"https://api.github.com/users/longjon/repos","events_url":"https://api.github.com/users/longjon/events{/privacy}","received_events_url":"https://api.github.com/users/longjon/received_events","type":"User","site_admin":false},"body":"\"that's at least start_id\", right? \"Since\" is ambiguous as to inclusion (and doesn't read well anyway).","created_at":"2016-03-01T23:52:52Z","updated_at":"2016-03-01T23:52:52Z","html_url":"https://github.com/BVLC/caffe/pull/3590#discussion_r54657188","pull_request_url":"https://api.github.com/repos/BVLC/caffe/pulls/3590","_links":{"self":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/comments/54657188"},"html":{"href":"https://github.com/BVLC/caffe/pull/3590#discussion_r54657188"},"pull_request":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/3590"}}},"pull_request":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/3590","id":56932284,"html_url":"https://github.com/BVLC/caffe/pull/3590","diff_url":"https://github.com/BVLC/caffe/pull/3590.diff","patch_url":"https://github.com/BVLC/caffe/pull/3590.patch","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/3590","number":3590,"state":"open","locked":false,"title":"Add functions to check and grab GPU","user":{"login":"junshi15","id":12075848,"avatar_url":"https://avatars.githubusercontent.com/u/12075848?v=3","gravatar_id":"","url":"https://api.github.com/users/junshi15","html_url":"https://github.com/junshi15","followers_url":"https://api.github.com/users/junshi15/followers","following_url":"https://api.github.com/users/junshi15/following{/other_user}","gists_url":"https://api.github.com/users/junshi15/gists{/gist_id}","starred_url":"https://api.github.com/users/junshi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junshi15/subscriptions","organizations_url":"https://api.github.com/users/junshi15/orgs","repos_url":"https://api.github.com/users/junshi15/repos","events_url":"https://api.github.com/users/junshi15/events{/privacy}","received_events_url":"https://api.github.com/users/junshi15/received_events","type":"User","site_admin":false},"body":"This PR introduces capability for Caffe applications to programmatically obtain GPU resources in a cloud environment. In such an environment, multiple Caffe applications may be allocated to a server, and these apps should be bound to different set of GPUs. ","created_at":"2016-01-22T19:42:42Z","updated_at":"2016-03-01T23:52:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c679824c3186b4abfb059475c1825130261e577","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BVLC/caffe/pulls/3590/commits","review_comments_url":"https://api.github.com/repos/BVLC/caffe/pulls/3590/comments","review_comment_url":"https://api.github.com/repos/BVLC/caffe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/3590/comments","statuses_url":"https://api.github.com/repos/BVLC/caffe/statuses/45bde08ef7601215b61616af47d97906c6824526","head":{"label":"junshi15:GPUUtilities","ref":"GPUUtilities","sha":"45bde08ef7601215b61616af47d97906c6824526","user":{"login":"junshi15","id":12075848,"avatar_url":"https://avatars.githubusercontent.com/u/12075848?v=3","gravatar_id":"","url":"https://api.github.com/users/junshi15","html_url":"https://github.com/junshi15","followers_url":"https://api.github.com/users/junshi15/followers","following_url":"https://api.github.com/users/junshi15/following{/other_user}","gists_url":"https://api.github.com/users/junshi15/gists{/gist_id}","starred_url":"https://api.github.com/users/junshi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junshi15/subscriptions","organizations_url":"https://api.github.com/users/junshi15/orgs","repos_url":"https://api.github.com/users/junshi15/repos","events_url":"https://api.github.com/users/junshi15/events{/privacy}","received_events_url":"https://api.github.com/users/junshi15/received_events","type":"User","site_admin":false},"repo":{"id":50181682,"name":"caffe","full_name":"junshi15/caffe","owner":{"login":"junshi15","id":12075848,"avatar_url":"https://avatars.githubusercontent.com/u/12075848?v=3","gravatar_id":"","url":"https://api.github.com/users/junshi15","html_url":"https://github.com/junshi15","followers_url":"https://api.github.com/users/junshi15/followers","following_url":"https://api.github.com/users/junshi15/following{/other_user}","gists_url":"https://api.github.com/users/junshi15/gists{/gist_id}","starred_url":"https://api.github.com/users/junshi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junshi15/subscriptions","organizations_url":"https://api.github.com/users/junshi15/orgs","repos_url":"https://api.github.com/users/junshi15/repos","events_url":"https://api.github.com/users/junshi15/events{/privacy}","received_events_url":"https://api.github.com/users/junshi15/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/junshi15/caffe","description":"Caffe: a fast open framework for deep learning.","fork":true,"url":"https://api.github.com/repos/junshi15/caffe","forks_url":"https://api.github.com/repos/junshi15/caffe/forks","keys_url":"https://api.github.com/repos/junshi15/caffe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junshi15/caffe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junshi15/caffe/teams","hooks_url":"https://api.github.com/repos/junshi15/caffe/hooks","issue_events_url":"https://api.github.com/repos/junshi15/caffe/issues/events{/number}","events_url":"https://api.github.com/repos/junshi15/caffe/events","assignees_url":"https://api.github.com/repos/junshi15/caffe/assignees{/user}","branches_url":"https://api.github.com/repos/junshi15/caffe/branches{/branch}","tags_url":"https://api.github.com/repos/junshi15/caffe/tags","blobs_url":"https://api.github.com/repos/junshi15/caffe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junshi15/caffe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junshi15/caffe/git/refs{/sha}","trees_url":"https://api.github.com/repos/junshi15/caffe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junshi15/caffe/statuses/{sha}","languages_url":"https://api.github.com/repos/junshi15/caffe/languages","stargazers_url":"https://api.github.com/repos/junshi15/caffe/stargazers","contributors_url":"https://api.github.com/repos/junshi15/caffe/contributors","subscribers_url":"https://api.github.com/repos/junshi15/caffe/subscribers","subscription_url":"https://api.github.com/repos/junshi15/caffe/subscription","commits_url":"https://api.github.com/repos/junshi15/caffe/commits{/sha}","git_commits_url":"https://api.github.com/repos/junshi15/caffe/git/commits{/sha}","comments_url":"https://api.github.com/repos/junshi15/caffe/comments{/number}","issue_comment_url":"https://api.github.com/repos/junshi15/caffe/issues/comments{/number}","contents_url":"https://api.github.com/repos/junshi15/caffe/contents/{+path}","compare_url":"https://api.github.com/repos/junshi15/caffe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junshi15/caffe/merges","archive_url":"https://api.github.com/repos/junshi15/caffe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junshi15/caffe/downloads","issues_url":"https://api.github.com/repos/junshi15/caffe/issues{/number}","pulls_url":"https://api.github.com/repos/junshi15/caffe/pulls{/number}","milestones_url":"https://api.github.com/repos/junshi15/caffe/milestones{/number}","notifications_url":"https://api.github.com/repos/junshi15/caffe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junshi15/caffe/labels{/name}","releases_url":"https://api.github.com/repos/junshi15/caffe/releases{/id}","deployments_url":"https://api.github.com/repos/junshi15/caffe/deployments","created_at":"2016-01-22T13:04:10Z","updated_at":"2016-01-22T13:04:13Z","pushed_at":"2016-02-25T18:57:34Z","git_url":"git://github.com/junshi15/caffe.git","ssh_url":"git@github.com:junshi15/caffe.git","clone_url":"https://github.com/junshi15/caffe.git","svn_url":"https://github.com/junshi15/caffe","homepage":"http://caffe.berkeleyvision.org/","size":36649,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BVLC:master","ref":"master","sha":"a97300c85a0e2171c2f5744877a1682cd467ae79","user":{"login":"BVLC","id":6182163,"avatar_url":"https://avatars.githubusercontent.com/u/6182163?v=3","gravatar_id":"","url":"https://api.github.com/users/BVLC","html_url":"https://github.com/BVLC","followers_url":"https://api.github.com/users/BVLC/followers","following_url":"https://api.github.com/users/BVLC/following{/other_user}","gists_url":"https://api.github.com/users/BVLC/gists{/gist_id}","starred_url":"https://api.github.com/users/BVLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BVLC/subscriptions","organizations_url":"https://api.github.com/users/BVLC/orgs","repos_url":"https://api.github.com/users/BVLC/repos","events_url":"https://api.github.com/users/BVLC/events{/privacy}","received_events_url":"https://api.github.com/users/BVLC/received_events","type":"Organization","site_admin":false},"repo":{"id":12791642,"name":"caffe","full_name":"BVLC/caffe","owner":{"login":"BVLC","id":6182163,"avatar_url":"https://avatars.githubusercontent.com/u/6182163?v=3","gravatar_id":"","url":"https://api.github.com/users/BVLC","html_url":"https://github.com/BVLC","followers_url":"https://api.github.com/users/BVLC/followers","following_url":"https://api.github.com/users/BVLC/following{/other_user}","gists_url":"https://api.github.com/users/BVLC/gists{/gist_id}","starred_url":"https://api.github.com/users/BVLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BVLC/subscriptions","organizations_url":"https://api.github.com/users/BVLC/orgs","repos_url":"https://api.github.com/users/BVLC/repos","events_url":"https://api.github.com/users/BVLC/events{/privacy}","received_events_url":"https://api.github.com/users/BVLC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BVLC/caffe","description":"Caffe: a fast open framework for deep learning.","fork":false,"url":"https://api.github.com/repos/BVLC/caffe","forks_url":"https://api.github.com/repos/BVLC/caffe/forks","keys_url":"https://api.github.com/repos/BVLC/caffe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BVLC/caffe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BVLC/caffe/teams","hooks_url":"https://api.github.com/repos/BVLC/caffe/hooks","issue_events_url":"https://api.github.com/repos/BVLC/caffe/issues/events{/number}","events_url":"https://api.github.com/repos/BVLC/caffe/events","assignees_url":"https://api.github.com/repos/BVLC/caffe/assignees{/user}","branches_url":"https://api.github.com/repos/BVLC/caffe/branches{/branch}","tags_url":"https://api.github.com/repos/BVLC/caffe/tags","blobs_url":"https://api.github.com/repos/BVLC/caffe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BVLC/caffe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BVLC/caffe/git/refs{/sha}","trees_url":"https://api.github.com/repos/BVLC/caffe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BVLC/caffe/statuses/{sha}","languages_url":"https://api.github.com/repos/BVLC/caffe/languages","stargazers_url":"https://api.github.com/repos/BVLC/caffe/stargazers","contributors_url":"https://api.github.com/repos/BVLC/caffe/contributors","subscribers_url":"https://api.github.com/repos/BVLC/caffe/subscribers","subscription_url":"https://api.github.com/repos/BVLC/caffe/subscription","commits_url":"https://api.github.com/repos/BVLC/caffe/commits{/sha}","git_commits_url":"https://api.github.com/repos/BVLC/caffe/git/commits{/sha}","comments_url":"https://api.github.com/repos/BVLC/caffe/comments{/number}","issue_comment_url":"https://api.github.com/repos/BVLC/caffe/issues/comments{/number}","contents_url":"https://api.github.com/repos/BVLC/caffe/contents/{+path}","compare_url":"https://api.github.com/repos/BVLC/caffe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BVLC/caffe/merges","archive_url":"https://api.github.com/repos/BVLC/caffe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BVLC/caffe/downloads","issues_url":"https://api.github.com/repos/BVLC/caffe/issues{/number}","pulls_url":"https://api.github.com/repos/BVLC/caffe/pulls{/number}","milestones_url":"https://api.github.com/repos/BVLC/caffe/milestones{/number}","notifications_url":"https://api.github.com/repos/BVLC/caffe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BVLC/caffe/labels{/name}","releases_url":"https://api.github.com/repos/BVLC/caffe/releases{/id}","deployments_url":"https://api.github.com/repos/BVLC/caffe/deployments","created_at":"2013-09-12T18:39:48Z","updated_at":"2016-03-01T22:57:30Z","pushed_at":"2016-03-01T23:41:46Z","git_url":"git://github.com/BVLC/caffe.git","ssh_url":"git@github.com:BVLC/caffe.git","clone_url":"https://github.com/BVLC/caffe.git","svn_url":"https://github.com/BVLC/caffe","homepage":"http://caffe.berkeleyvision.org/","size":257102,"stargazers_count":8689,"watchers_count":8689,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4945,"mirror_url":null,"open_issues_count":529,"forks":4945,"open_issues":529,"watchers":8689,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/3590"},"html":{"href":"https://github.com/BVLC/caffe/pull/3590"},"issue":{"href":"https://api.github.com/repos/BVLC/caffe/issues/3590"},"comments":{"href":"https://api.github.com/repos/BVLC/caffe/issues/3590/comments"},"review_comments":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/3590/comments"},"review_comment":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/3590/commits"},"statuses":{"href":"https://api.github.com/repos/BVLC/caffe/statuses/45bde08ef7601215b61616af47d97906c6824526"}}}}