{"action":"created","comment":{"url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/comments/223219013","pull_request_review_id":162295601,"id":223219013,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzIxOTAxMw==","diff_hunk":"@@ -287,6 +296,9 @@ trait TensorExp extends Dsl with Diff {\n     * cuBLAS tensor operation backend. WIP.\n     */\n   class BackendCublas extends Backend {\n+    override def setup(): Unit = unchecked[Unit](\"cublasHandle_t handle;\\nCUBLAS_CALL(cublasCreate(&handle));\")","path":"src/main/scala/lantern/ad_lms_vector.scala","position":27,"original_position":27,"commit_id":"d19c98c7fb167e9d1e5f9dac6ac8cb005b6fe465","original_commit_id":"d19c98c7fb167e9d1e5f9dac6ac8cb005b6fe465","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"body":"This `unchecked` call is not useful by itself because it doesn't actually get code generated. (Perhaps it's removed by DCE since it has no users.)\r\nDo you know how I can cause it to be generated? @TiarkRompf @feiwang3311 \r\n\r\nPlease hold off on merging until this is fixed.","created_at":"2018-10-07T16:13:15Z","updated_at":"2018-10-07T16:15:14Z","html_url":"https://github.com/feiwang3311/Lantern/pull/20#discussion_r223219013","pull_request_url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/comments/223219013"},"html":{"href":"https://github.com/feiwang3311/Lantern/pull/20#discussion_r223219013"},"pull_request":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20","id":220949768,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwOTQ5NzY4","html_url":"https://github.com/feiwang3311/Lantern/pull/20","diff_url":"https://github.com/feiwang3311/Lantern/pull/20.diff","patch_url":"https://github.com/feiwang3311/Lantern/pull/20.patch","issue_url":"https://api.github.com/repos/feiwang3311/Lantern/issues/20","number":20,"state":"open","locked":false,"title":"Separate backend setup/cleanup from codegen template.","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"body":"- Move `cublasHandle_t` management from codegen template to `Backend` trait.\r\n- Create `LanternDriver` trait defining a `wrapper` function around\r\n  `snippet` that performs backend setup/cleanup.\r\n- Use subclasses of `LanternDriver` in tests.\r\n\r\nNote: if one manually implements `DslDriverC extends TensorExp`, they\r\nare now responsible for invoking `backend.setup()` and `backend.cleanup()`\r\nwithin the snippet.\r\n\r\nUsing subclasses of `LanternDriver` directly (e.g. `LanternDriverC`) is\r\nhighly encouraged.\r\n\r\nAddresses [feedback](https://github.com/feiwang3311/Lantern/pull/18#discussion_r223192324)  by @TiarkRompf.","created_at":"2018-10-07T14:00:12Z","updated_at":"2018-10-07T16:15:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c8d8fc7da72b0db8683de8ac36f140a20b7d320","assignee":null,"assignees":[],"requested_reviewers":[{"login":"TiarkRompf","id":365911,"node_id":"MDQ6VXNlcjM2NTkxMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/365911?v=4","gravatar_id":"","url":"https://api.github.com/users/TiarkRompf","html_url":"https://github.com/TiarkRompf","followers_url":"https://api.github.com/users/TiarkRompf/followers","following_url":"https://api.github.com/users/TiarkRompf/following{/other_user}","gists_url":"https://api.github.com/users/TiarkRompf/gists{/gist_id}","starred_url":"https://api.github.com/users/TiarkRompf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiarkRompf/subscriptions","organizations_url":"https://api.github.com/users/TiarkRompf/orgs","repos_url":"https://api.github.com/users/TiarkRompf/repos","events_url":"https://api.github.com/users/TiarkRompf/events{/privacy}","received_events_url":"https://api.github.com/users/TiarkRompf/received_events","type":"User","site_admin":false},{"login":"feiwang3311","id":12819986,"node_id":"MDQ6VXNlcjEyODE5OTg2","avatar_url":"https://avatars0.githubusercontent.com/u/12819986?v=4","gravatar_id":"","url":"https://api.github.com/users/feiwang3311","html_url":"https://github.com/feiwang3311","followers_url":"https://api.github.com/users/feiwang3311/followers","following_url":"https://api.github.com/users/feiwang3311/following{/other_user}","gists_url":"https://api.github.com/users/feiwang3311/gists{/gist_id}","starred_url":"https://api.github.com/users/feiwang3311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feiwang3311/subscriptions","organizations_url":"https://api.github.com/users/feiwang3311/orgs","repos_url":"https://api.github.com/users/feiwang3311/repos","events_url":"https://api.github.com/users/feiwang3311/events{/privacy}","received_events_url":"https://api.github.com/users/feiwang3311/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20/commits","review_comments_url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20/comments","review_comment_url":"https://api.github.com/repos/feiwang3311/Lantern/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feiwang3311/Lantern/issues/20/comments","statuses_url":"https://api.github.com/repos/feiwang3311/Lantern/statuses/d19c98c7fb167e9d1e5f9dac6ac8cb005b6fe465","head":{"label":"dan-zheng:lantern-driver","ref":"lantern-driver","sha":"d19c98c7fb167e9d1e5f9dac6ac8cb005b6fe465","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"repo":{"id":146918678,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY5MTg2Nzg=","name":"Lantern","full_name":"dan-zheng/Lantern","private":false,"owner":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dan-zheng/Lantern","description":null,"fork":true,"url":"https://api.github.com/repos/dan-zheng/Lantern","forks_url":"https://api.github.com/repos/dan-zheng/Lantern/forks","keys_url":"https://api.github.com/repos/dan-zheng/Lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan-zheng/Lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan-zheng/Lantern/teams","hooks_url":"https://api.github.com/repos/dan-zheng/Lantern/hooks","issue_events_url":"https://api.github.com/repos/dan-zheng/Lantern/issues/events{/number}","events_url":"https://api.github.com/repos/dan-zheng/Lantern/events","assignees_url":"https://api.github.com/repos/dan-zheng/Lantern/assignees{/user}","branches_url":"https://api.github.com/repos/dan-zheng/Lantern/branches{/branch}","tags_url":"https://api.github.com/repos/dan-zheng/Lantern/tags","blobs_url":"https://api.github.com/repos/dan-zheng/Lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan-zheng/Lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan-zheng/Lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan-zheng/Lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan-zheng/Lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/dan-zheng/Lantern/languages","stargazers_url":"https://api.github.com/repos/dan-zheng/Lantern/stargazers","contributors_url":"https://api.github.com/repos/dan-zheng/Lantern/contributors","subscribers_url":"https://api.github.com/repos/dan-zheng/Lantern/subscribers","subscription_url":"https://api.github.com/repos/dan-zheng/Lantern/subscription","commits_url":"https://api.github.com/repos/dan-zheng/Lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan-zheng/Lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan-zheng/Lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan-zheng/Lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan-zheng/Lantern/contents/{+path}","compare_url":"https://api.github.com/repos/dan-zheng/Lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan-zheng/Lantern/merges","archive_url":"https://api.github.com/repos/dan-zheng/Lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan-zheng/Lantern/downloads","issues_url":"https://api.github.com/repos/dan-zheng/Lantern/issues{/number}","pulls_url":"https://api.github.com/repos/dan-zheng/Lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/dan-zheng/Lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/dan-zheng/Lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan-zheng/Lantern/labels{/name}","releases_url":"https://api.github.com/repos/dan-zheng/Lantern/releases{/id}","deployments_url":"https://api.github.com/repos/dan-zheng/Lantern/deployments","created_at":"2018-08-31T16:44:05Z","updated_at":"2018-10-07T05:08:33Z","pushed_at":"2018-10-07T14:03:21Z","git_url":"git://github.com/dan-zheng/Lantern.git","ssh_url":"git@github.com:dan-zheng/Lantern.git","clone_url":"https://github.com/dan-zheng/Lantern.git","svn_url":"https://github.com/dan-zheng/Lantern","homepage":null,"size":109212,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"feiwang3311:master","ref":"master","sha":"87c1d2cde1f061a82bac3adb7d04c416e9c6e75f","user":{"login":"feiwang3311","id":12819986,"node_id":"MDQ6VXNlcjEyODE5OTg2","avatar_url":"https://avatars0.githubusercontent.com/u/12819986?v=4","gravatar_id":"","url":"https://api.github.com/users/feiwang3311","html_url":"https://github.com/feiwang3311","followers_url":"https://api.github.com/users/feiwang3311/followers","following_url":"https://api.github.com/users/feiwang3311/following{/other_user}","gists_url":"https://api.github.com/users/feiwang3311/gists{/gist_id}","starred_url":"https://api.github.com/users/feiwang3311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feiwang3311/subscriptions","organizations_url":"https://api.github.com/users/feiwang3311/orgs","repos_url":"https://api.github.com/users/feiwang3311/repos","events_url":"https://api.github.com/users/feiwang3311/events{/privacy}","received_events_url":"https://api.github.com/users/feiwang3311/received_events","type":"User","site_admin":false},"repo":{"id":121559573,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1NTk1NzM=","name":"Lantern","full_name":"feiwang3311/Lantern","private":false,"owner":{"login":"feiwang3311","id":12819986,"node_id":"MDQ6VXNlcjEyODE5OTg2","avatar_url":"https://avatars0.githubusercontent.com/u/12819986?v=4","gravatar_id":"","url":"https://api.github.com/users/feiwang3311","html_url":"https://github.com/feiwang3311","followers_url":"https://api.github.com/users/feiwang3311/followers","following_url":"https://api.github.com/users/feiwang3311/following{/other_user}","gists_url":"https://api.github.com/users/feiwang3311/gists{/gist_id}","starred_url":"https://api.github.com/users/feiwang3311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feiwang3311/subscriptions","organizations_url":"https://api.github.com/users/feiwang3311/orgs","repos_url":"https://api.github.com/users/feiwang3311/repos","events_url":"https://api.github.com/users/feiwang3311/events{/privacy}","received_events_url":"https://api.github.com/users/feiwang3311/received_events","type":"User","site_admin":false},"html_url":"https://github.com/feiwang3311/Lantern","description":null,"fork":false,"url":"https://api.github.com/repos/feiwang3311/Lantern","forks_url":"https://api.github.com/repos/feiwang3311/Lantern/forks","keys_url":"https://api.github.com/repos/feiwang3311/Lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feiwang3311/Lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feiwang3311/Lantern/teams","hooks_url":"https://api.github.com/repos/feiwang3311/Lantern/hooks","issue_events_url":"https://api.github.com/repos/feiwang3311/Lantern/issues/events{/number}","events_url":"https://api.github.com/repos/feiwang3311/Lantern/events","assignees_url":"https://api.github.com/repos/feiwang3311/Lantern/assignees{/user}","branches_url":"https://api.github.com/repos/feiwang3311/Lantern/branches{/branch}","tags_url":"https://api.github.com/repos/feiwang3311/Lantern/tags","blobs_url":"https://api.github.com/repos/feiwang3311/Lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feiwang3311/Lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feiwang3311/Lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/feiwang3311/Lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feiwang3311/Lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/feiwang3311/Lantern/languages","stargazers_url":"https://api.github.com/repos/feiwang3311/Lantern/stargazers","contributors_url":"https://api.github.com/repos/feiwang3311/Lantern/contributors","subscribers_url":"https://api.github.com/repos/feiwang3311/Lantern/subscribers","subscription_url":"https://api.github.com/repos/feiwang3311/Lantern/subscription","commits_url":"https://api.github.com/repos/feiwang3311/Lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/feiwang3311/Lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/feiwang3311/Lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/feiwang3311/Lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/feiwang3311/Lantern/contents/{+path}","compare_url":"https://api.github.com/repos/feiwang3311/Lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feiwang3311/Lantern/merges","archive_url":"https://api.github.com/repos/feiwang3311/Lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feiwang3311/Lantern/downloads","issues_url":"https://api.github.com/repos/feiwang3311/Lantern/issues{/number}","pulls_url":"https://api.github.com/repos/feiwang3311/Lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/feiwang3311/Lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/feiwang3311/Lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feiwang3311/Lantern/labels{/name}","releases_url":"https://api.github.com/repos/feiwang3311/Lantern/releases{/id}","deployments_url":"https://api.github.com/repos/feiwang3311/Lantern/deployments","created_at":"2018-02-14T20:47:14Z","updated_at":"2018-10-07T05:08:37Z","pushed_at":"2018-10-07T14:03:23Z","git_url":"git://github.com/feiwang3311/Lantern.git","ssh_url":"git@github.com:feiwang3311/Lantern.git","clone_url":"https://github.com/feiwang3311/Lantern.git","svn_url":"https://github.com/feiwang3311/Lantern","homepage":null,"size":109250,"stargazers_count":46,"watchers_count":46,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":6,"open_issues":6,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20"},"html":{"href":"https://github.com/feiwang3311/Lantern/pull/20"},"issue":{"href":"https://api.github.com/repos/feiwang3311/Lantern/issues/20"},"comments":{"href":"https://api.github.com/repos/feiwang3311/Lantern/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feiwang3311/Lantern/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/feiwang3311/Lantern/statuses/d19c98c7fb167e9d1e5f9dac6ac8cb005b6fe465"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dan-zheng"}}