{"action":"created","comment":{"url":"https://api.github.com/repos/rapidsai/cuml/pulls/comments/278906694","pull_request_review_id":231103341,"id":278906694,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3ODkwNjY5NA==","diff_hunk":"@@ -294,55 +294,48 @@ std::ostream &operator<<(std::ostream &os, const SimpleMat<T> &mat) {\n   return os;\n }\n \n-// TODO The following classes own their storage and are just for testing\n-// The internals should be replaced by device_buffer+device_allocator, when ready\n template <typename T> struct SimpleVecOwning : SimpleVec<T> {\n   typedef SimpleVec<T> Super;\n-  bool allocated;\n+  typedef MLCommon::device_buffer<T> Buffer;\n+  std::unique_ptr<Buffer> buf;\n \n-  SimpleVecOwning() : Super(), allocated(false) {}\n+  SimpleVecOwning() : Super() {}\n \n-  SimpleVecOwning(int n) : Super(), allocated(false) { reset(n); }\n-\n-  ~SimpleVecOwning() noexcept(false) { CUDA_CHECK(cudaFree(Super::data)); }\n+  SimpleVecOwning(const cumlHandle_impl &handle, int n, cudaStream_t stream)\n+      : Super() {\n+    reset(handle, n, stream);\n+  }\n \n-  void reset(int n) {\n-    if (allocated) {\n-      CUDA_CHECK(cudaFree(this->data));\n-    }\n-    MLCommon::allocate(this->data, n);\n-    Super::reset(this->data, n);\n-    allocated = true;\n+  void reset(const cumlHandle_impl &handle, int n, cudaStream_t stream) {\n+    buf.reset(new Buffer(handle.getDeviceAllocator(), stream, n));\n+    Super::reset(buf->data(), n);\n   }\n \n-  void operator=(const SimpleVec<T> &other) { Super::operator=(other); }\n+  void operator=(const SimpleVec<T> &other) = delete;\n };\n \n template <typename T> struct SimpleMatOwning : SimpleMat<T> {\n   typedef SimpleMat<T> Super;\n-  bool allocated;\n+  typedef MLCommon::device_buffer<T> Buffer;\n+  std::unique_ptr<Buffer> buf;\n   using Super::m;\n   using Super::n;\n   using Super::ord;\n \n-  SimpleMatOwning(STORAGE_ORDER order = COL_MAJOR)\n-      : Super(order), allocated(false) {}\n+  SimpleMatOwning(STORAGE_ORDER order = COL_MAJOR) : Super(order) {}\n \n-  SimpleMatOwning(int m, int n, STORAGE_ORDER order = COL_MAJOR)\n-      : Super(order), allocated(false) {\n-    reset(m, n);\n+  SimpleMatOwning(const cumlHandle_impl &handle, int m, int n,\n+                  cudaStream_t stream, STORAGE_ORDER order = COL_MAJOR)\n+      : Super(order) {\n+    reset(handle, m, n, stream);\n   }\n \n-  ~SimpleMatOwning() noexcept(false) { CUDA_CHECK(cudaFree(Super::data)); }\n-  void reset(int m, int n) {\n-\n-    if (allocated) {\n-      CUDA_CHECK(cudaFree(this->data));\n-    }\n-    MLCommon::allocate(Super::data, m * n);\n-    Super::reset(Super::data, m, n);\n-    allocated = true;\n+  void reset(const cumlHandle_impl &handle, int m, int n, cudaStream_t stream) {\n+    buf.reset(new Buffer(handle.getDeviceAllocator(), stream, m * n));","path":"cuML/src/glm/qn/simple_mat.h","position":null,"original_position":239,"commit_id":"e2f00ecbaf5ccf1b3cb95288049edf156fca6d64","original_commit_id":"cacd5a0ff9f7d27b6f73a8f2b2f8b6ea50556b24","user":{"login":"yjk21","id":6737542,"node_id":"MDQ6VXNlcjY3Mzc1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6737542?v=4","gravatar_id":"","url":"https://api.github.com/users/yjk21","html_url":"https://github.com/yjk21","followers_url":"https://api.github.com/users/yjk21/followers","following_url":"https://api.github.com/users/yjk21/following{/other_user}","gists_url":"https://api.github.com/users/yjk21/gists{/gist_id}","starred_url":"https://api.github.com/users/yjk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjk21/subscriptions","organizations_url":"https://api.github.com/users/yjk21/orgs","repos_url":"https://api.github.com/users/yjk21/repos","events_url":"https://api.github.com/users/yjk21/events{/privacy}","received_events_url":"https://api.github.com/users/yjk21/received_events","type":"User","site_admin":false},"body":"Reset was removed","created_at":"2019-04-26T11:18:05Z","updated_at":"2019-04-26T11:18:05Z","html_url":"https://github.com/rapidsai/cuml/pull/481#discussion_r278906694","pull_request_url":"https://api.github.com/repos/rapidsai/cuml/pulls/481","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/comments/278906694"},"html":{"href":"https://github.com/rapidsai/cuml/pull/481#discussion_r278906694"},"pull_request":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/481"}},"in_reply_to_id":278600224},"pull_request":{"url":"https://api.github.com/repos/rapidsai/cuml/pulls/481","id":270914640,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcwOTE0NjQw","html_url":"https://github.com/rapidsai/cuml/pull/481","diff_url":"https://github.com/rapidsai/cuml/pull/481.diff","patch_url":"https://github.com/rapidsai/cuml/pull/481.patch","issue_url":"https://api.github.com/repos/rapidsai/cuml/issues/481","number":481,"state":"open","locked":false,"title":"[REVIEW] Refactoring Quasi-Newton to use cumlHandle","user":{"login":"yjk21","id":6737542,"node_id":"MDQ6VXNlcjY3Mzc1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6737542?v=4","gravatar_id":"","url":"https://api.github.com/users/yjk21","html_url":"https://github.com/yjk21","followers_url":"https://api.github.com/users/yjk21/followers","following_url":"https://api.github.com/users/yjk21/following{/other_user}","gists_url":"https://api.github.com/users/yjk21/gists{/gist_id}","starred_url":"https://api.github.com/users/yjk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjk21/subscriptions","organizations_url":"https://api.github.com/users/yjk21/orgs","repos_url":"https://api.github.com/users/yjk21/repos","events_url":"https://api.github.com/users/yjk21/events{/privacy}","received_events_url":"https://api.github.com/users/yjk21/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-04-16T13:40:16Z","updated_at":"2019-04-26T11:18:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56b9019f2ea7b27e1c2ceacd4aa1eb182f21f272","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cjnolet","id":1242464,"node_id":"MDQ6VXNlcjEyNDI0NjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1242464?v=4","gravatar_id":"","url":"https://api.github.com/users/cjnolet","html_url":"https://github.com/cjnolet","followers_url":"https://api.github.com/users/cjnolet/followers","following_url":"https://api.github.com/users/cjnolet/following{/other_user}","gists_url":"https://api.github.com/users/cjnolet/gists{/gist_id}","starred_url":"https://api.github.com/users/cjnolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjnolet/subscriptions","organizations_url":"https://api.github.com/users/cjnolet/orgs","repos_url":"https://api.github.com/users/cjnolet/repos","events_url":"https://api.github.com/users/cjnolet/events{/privacy}","received_events_url":"https://api.github.com/users/cjnolet/received_events","type":"User","site_admin":false},{"login":"oyilmaz-nvidia","id":35306097,"node_id":"MDQ6VXNlcjM1MzA2MDk3","avatar_url":"https://avatars2.githubusercontent.com/u/35306097?v=4","gravatar_id":"","url":"https://api.github.com/users/oyilmaz-nvidia","html_url":"https://github.com/oyilmaz-nvidia","followers_url":"https://api.github.com/users/oyilmaz-nvidia/followers","following_url":"https://api.github.com/users/oyilmaz-nvidia/following{/other_user}","gists_url":"https://api.github.com/users/oyilmaz-nvidia/gists{/gist_id}","starred_url":"https://api.github.com/users/oyilmaz-nvidia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyilmaz-nvidia/subscriptions","organizations_url":"https://api.github.com/users/oyilmaz-nvidia/orgs","repos_url":"https://api.github.com/users/oyilmaz-nvidia/repos","events_url":"https://api.github.com/users/oyilmaz-nvidia/events{/privacy}","received_events_url":"https://api.github.com/users/oyilmaz-nvidia/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1114227097,"node_id":"MDU6TGFiZWwxMTE0MjI3MDk3","url":"https://api.github.com/repos/rapidsai/cuml/labels/3%20-%20Ready%20for%20Review","name":"3 - Ready for Review","color":"c2e0c6","default":false},{"id":1264890081,"node_id":"MDU6TGFiZWwxMjY0ODkwMDgx","url":"https://api.github.com/repos/rapidsai/cuml/labels/Algorithm%20API%20Change","name":"Algorithm API Change","color":"ed9abb","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rapidsai/cuml/pulls/481/commits","review_comments_url":"https://api.github.com/repos/rapidsai/cuml/pulls/481/comments","review_comment_url":"https://api.github.com/repos/rapidsai/cuml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapidsai/cuml/issues/481/comments","statuses_url":"https://api.github.com/repos/rapidsai/cuml/statuses/e2f00ecbaf5ccf1b3cb95288049edf156fca6d64","head":{"label":"yjk21:fea-ext-glm-cumlhandle","ref":"fea-ext-glm-cumlhandle","sha":"e2f00ecbaf5ccf1b3cb95288049edf156fca6d64","user":{"login":"yjk21","id":6737542,"node_id":"MDQ6VXNlcjY3Mzc1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6737542?v=4","gravatar_id":"","url":"https://api.github.com/users/yjk21","html_url":"https://github.com/yjk21","followers_url":"https://api.github.com/users/yjk21/followers","following_url":"https://api.github.com/users/yjk21/following{/other_user}","gists_url":"https://api.github.com/users/yjk21/gists{/gist_id}","starred_url":"https://api.github.com/users/yjk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjk21/subscriptions","organizations_url":"https://api.github.com/users/yjk21/orgs","repos_url":"https://api.github.com/users/yjk21/repos","events_url":"https://api.github.com/users/yjk21/events{/privacy}","received_events_url":"https://api.github.com/users/yjk21/received_events","type":"User","site_admin":false},"repo":{"id":168158510,"node_id":"MDEwOlJlcG9zaXRvcnkxNjgxNTg1MTA=","name":"cuml","full_name":"yjk21/cuml","private":false,"owner":{"login":"yjk21","id":6737542,"node_id":"MDQ6VXNlcjY3Mzc1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6737542?v=4","gravatar_id":"","url":"https://api.github.com/users/yjk21","html_url":"https://github.com/yjk21","followers_url":"https://api.github.com/users/yjk21/followers","following_url":"https://api.github.com/users/yjk21/following{/other_user}","gists_url":"https://api.github.com/users/yjk21/gists{/gist_id}","starred_url":"https://api.github.com/users/yjk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjk21/subscriptions","organizations_url":"https://api.github.com/users/yjk21/orgs","repos_url":"https://api.github.com/users/yjk21/repos","events_url":"https://api.github.com/users/yjk21/events{/privacy}","received_events_url":"https://api.github.com/users/yjk21/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yjk21/cuml","description":"cuML - RAPIDS Machine Learning Library ","fork":true,"url":"https://api.github.com/repos/yjk21/cuml","forks_url":"https://api.github.com/repos/yjk21/cuml/forks","keys_url":"https://api.github.com/repos/yjk21/cuml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yjk21/cuml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yjk21/cuml/teams","hooks_url":"https://api.github.com/repos/yjk21/cuml/hooks","issue_events_url":"https://api.github.com/repos/yjk21/cuml/issues/events{/number}","events_url":"https://api.github.com/repos/yjk21/cuml/events","assignees_url":"https://api.github.com/repos/yjk21/cuml/assignees{/user}","branches_url":"https://api.github.com/repos/yjk21/cuml/branches{/branch}","tags_url":"https://api.github.com/repos/yjk21/cuml/tags","blobs_url":"https://api.github.com/repos/yjk21/cuml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yjk21/cuml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yjk21/cuml/git/refs{/sha}","trees_url":"https://api.github.com/repos/yjk21/cuml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yjk21/cuml/statuses/{sha}","languages_url":"https://api.github.com/repos/yjk21/cuml/languages","stargazers_url":"https://api.github.com/repos/yjk21/cuml/stargazers","contributors_url":"https://api.github.com/repos/yjk21/cuml/contributors","subscribers_url":"https://api.github.com/repos/yjk21/cuml/subscribers","subscription_url":"https://api.github.com/repos/yjk21/cuml/subscription","commits_url":"https://api.github.com/repos/yjk21/cuml/commits{/sha}","git_commits_url":"https://api.github.com/repos/yjk21/cuml/git/commits{/sha}","comments_url":"https://api.github.com/repos/yjk21/cuml/comments{/number}","issue_comment_url":"https://api.github.com/repos/yjk21/cuml/issues/comments{/number}","contents_url":"https://api.github.com/repos/yjk21/cuml/contents/{+path}","compare_url":"https://api.github.com/repos/yjk21/cuml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yjk21/cuml/merges","archive_url":"https://api.github.com/repos/yjk21/cuml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yjk21/cuml/downloads","issues_url":"https://api.github.com/repos/yjk21/cuml/issues{/number}","pulls_url":"https://api.github.com/repos/yjk21/cuml/pulls{/number}","milestones_url":"https://api.github.com/repos/yjk21/cuml/milestones{/number}","notifications_url":"https://api.github.com/repos/yjk21/cuml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yjk21/cuml/labels{/name}","releases_url":"https://api.github.com/repos/yjk21/cuml/releases{/id}","deployments_url":"https://api.github.com/repos/yjk21/cuml/deployments","created_at":"2019-01-29T13:23:39Z","updated_at":"2019-03-25T15:42:55Z","pushed_at":"2019-04-26T11:16:42Z","git_url":"git://github.com/yjk21/cuml.git","ssh_url":"git@github.com:yjk21/cuml.git","clone_url":"https://github.com/yjk21/cuml.git","svn_url":"https://github.com/yjk21/cuml","homepage":"","size":8579,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"branch-0.6"}},"base":{"label":"rapidsai:branch-0.7","ref":"branch-0.7","sha":"234a1b344c2d029904fd94917c58adcc7cc94c60","user":{"login":"rapidsai","id":43887749,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODg3NzQ5","avatar_url":"https://avatars2.githubusercontent.com/u/43887749?v=4","gravatar_id":"","url":"https://api.github.com/users/rapidsai","html_url":"https://github.com/rapidsai","followers_url":"https://api.github.com/users/rapidsai/followers","following_url":"https://api.github.com/users/rapidsai/following{/other_user}","gists_url":"https://api.github.com/users/rapidsai/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidsai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidsai/subscriptions","organizations_url":"https://api.github.com/users/rapidsai/orgs","repos_url":"https://api.github.com/users/rapidsai/repos","events_url":"https://api.github.com/users/rapidsai/events{/privacy}","received_events_url":"https://api.github.com/users/rapidsai/received_events","type":"Organization","site_admin":false},"repo":{"id":152616802,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI2MTY4MDI=","name":"cuml","full_name":"rapidsai/cuml","private":false,"owner":{"login":"rapidsai","id":43887749,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODg3NzQ5","avatar_url":"https://avatars2.githubusercontent.com/u/43887749?v=4","gravatar_id":"","url":"https://api.github.com/users/rapidsai","html_url":"https://github.com/rapidsai","followers_url":"https://api.github.com/users/rapidsai/followers","following_url":"https://api.github.com/users/rapidsai/following{/other_user}","gists_url":"https://api.github.com/users/rapidsai/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidsai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidsai/subscriptions","organizations_url":"https://api.github.com/users/rapidsai/orgs","repos_url":"https://api.github.com/users/rapidsai/repos","events_url":"https://api.github.com/users/rapidsai/events{/privacy}","received_events_url":"https://api.github.com/users/rapidsai/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rapidsai/cuml","description":"cuML - RAPIDS Machine Learning Library ","fork":false,"url":"https://api.github.com/repos/rapidsai/cuml","forks_url":"https://api.github.com/repos/rapidsai/cuml/forks","keys_url":"https://api.github.com/repos/rapidsai/cuml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapidsai/cuml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapidsai/cuml/teams","hooks_url":"https://api.github.com/repos/rapidsai/cuml/hooks","issue_events_url":"https://api.github.com/repos/rapidsai/cuml/issues/events{/number}","events_url":"https://api.github.com/repos/rapidsai/cuml/events","assignees_url":"https://api.github.com/repos/rapidsai/cuml/assignees{/user}","branches_url":"https://api.github.com/repos/rapidsai/cuml/branches{/branch}","tags_url":"https://api.github.com/repos/rapidsai/cuml/tags","blobs_url":"https://api.github.com/repos/rapidsai/cuml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapidsai/cuml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapidsai/cuml/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapidsai/cuml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapidsai/cuml/statuses/{sha}","languages_url":"https://api.github.com/repos/rapidsai/cuml/languages","stargazers_url":"https://api.github.com/repos/rapidsai/cuml/stargazers","contributors_url":"https://api.github.com/repos/rapidsai/cuml/contributors","subscribers_url":"https://api.github.com/repos/rapidsai/cuml/subscribers","subscription_url":"https://api.github.com/repos/rapidsai/cuml/subscription","commits_url":"https://api.github.com/repos/rapidsai/cuml/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapidsai/cuml/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapidsai/cuml/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapidsai/cuml/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapidsai/cuml/contents/{+path}","compare_url":"https://api.github.com/repos/rapidsai/cuml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapidsai/cuml/merges","archive_url":"https://api.github.com/repos/rapidsai/cuml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapidsai/cuml/downloads","issues_url":"https://api.github.com/repos/rapidsai/cuml/issues{/number}","pulls_url":"https://api.github.com/repos/rapidsai/cuml/pulls{/number}","milestones_url":"https://api.github.com/repos/rapidsai/cuml/milestones{/number}","notifications_url":"https://api.github.com/repos/rapidsai/cuml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapidsai/cuml/labels{/name}","releases_url":"https://api.github.com/repos/rapidsai/cuml/releases{/id}","deployments_url":"https://api.github.com/repos/rapidsai/cuml/deployments","created_at":"2018-10-11T15:45:35Z","updated_at":"2019-04-25T17:46:30Z","pushed_at":"2019-04-26T11:16:43Z","git_url":"git://github.com/rapidsai/cuml.git","ssh_url":"git@github.com:rapidsai/cuml.git","clone_url":"https://github.com/rapidsai/cuml.git","svn_url":"https://github.com/rapidsai/cuml","homepage":"","size":8597,"stargazers_count":481,"watchers_count":481,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":157,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":87,"open_issues":157,"watchers":481,"default_branch":"branch-0.7"}},"_links":{"self":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/481"},"html":{"href":"https://github.com/rapidsai/cuml/pull/481"},"issue":{"href":"https://api.github.com/repos/rapidsai/cuml/issues/481"},"comments":{"href":"https://api.github.com/repos/rapidsai/cuml/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapidsai/cuml/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/rapidsai/cuml/statuses/e2f00ecbaf5ccf1b3cb95288049edf156fca6d64"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yjk21"}}