{"action":"created","comment":{"url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments/63356382","id":63356382,"diff_hunk":"@@ -1489,36 +1489,13 @@ void CuMatrixBase<Real>::FindRowMaxId(CuArray<int32> *id) const {\n #if HAVE_CUDA == 1\n   if (CuDevice::Instantiate().Enabled()) {\n     Timer tim;\n-\n-    // initialize the vectors\n-    CuVector<Real> max(num_rows_);\n-    max.Set(-1e21);\n     id->Resize(num_rows_);\n-    id->Set(-1);\n+    MatrixDim d = Dim();\n+    dim3 dimBlock(CU1DBLOCK);","path":"src/cudamatrix/cu-matrix.cc","position":11,"original_position":11,"commit_id":"03ffd242c7988a4e5b897f212316de6db4225823","original_commit_id":"03ffd242c7988a4e5b897f212316de6db4225823","user":{"login":"vesis84","id":12798449,"avatar_url":"https://avatars.githubusercontent.com/u/12798449?v=3","gravatar_id":"","url":"https://api.github.com/users/vesis84","html_url":"https://github.com/vesis84","followers_url":"https://api.github.com/users/vesis84/followers","following_url":"https://api.github.com/users/vesis84/following{/other_user}","gists_url":"https://api.github.com/users/vesis84/gists{/gist_id}","starred_url":"https://api.github.com/users/vesis84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vesis84/subscriptions","organizations_url":"https://api.github.com/users/vesis84/orgs","repos_url":"https://api.github.com/users/vesis84/repos","events_url":"https://api.github.com/users/vesis84/events{/privacy}","received_events_url":"https://api.github.com/users/vesis84/received_events","type":"User","site_admin":false},"body":"Here we could add a comment describing the special layout of CUDA blocks and grids:\r\n// CUDA thread layout: one block of threads per matrix-line,","created_at":"2016-05-16T13:59:11Z","updated_at":"2016-05-16T13:59:11Z","html_url":"https://github.com/kaldi-asr/kaldi/pull/780#discussion_r63356382","pull_request_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780","_links":{"self":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments/63356382"},"html":{"href":"https://github.com/kaldi-asr/kaldi/pull/780#discussion_r63356382"},"pull_request":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780"}}},"pull_request":{"url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780","id":70123479,"html_url":"https://github.com/kaldi-asr/kaldi/pull/780","diff_url":"https://github.com/kaldi-asr/kaldi/pull/780.diff","patch_url":"https://github.com/kaldi-asr/kaldi/pull/780.patch","issue_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/780","number":780,"state":"open","locked":false,"title":"A new CUDA kernel for CuMatrixBase<Real>::FindRowMaxId;","user":{"login":"kangshiyin","id":3216836,"avatar_url":"https://avatars.githubusercontent.com/u/3216836?v=3","gravatar_id":"","url":"https://api.github.com/users/kangshiyin","html_url":"https://github.com/kangshiyin","followers_url":"https://api.github.com/users/kangshiyin/followers","following_url":"https://api.github.com/users/kangshiyin/following{/other_user}","gists_url":"https://api.github.com/users/kangshiyin/gists{/gist_id}","starred_url":"https://api.github.com/users/kangshiyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangshiyin/subscriptions","organizations_url":"https://api.github.com/users/kangshiyin/orgs","repos_url":"https://api.github.com/users/kangshiyin/repos","events_url":"https://api.github.com/users/kangshiyin/events{/privacy}","received_events_url":"https://api.github.com/users/kangshiyin/received_events","type":"User","site_admin":false},"body":"Old:\r\nLOG (TestCuFindRowMaxId():cu-matrix-speed-test.cc:264) For CuMatrix::FindRowMaxId<float>, for dim = 1024, speed was 3.99218 gigaflops.\r\nLOG (TestCuFindRowMaxId():cu-matrix-speed-test.cc:264) For CuMatrix::FindRowMaxId<double>, for dim = 1024, speed was 3.46283 gigaflops.\r\n\r\nNew:\r\nLOG (TestCuFindRowMaxId():cu-matrix-speed-test.cc:264) For CuMatrix::FindRowMaxId<float>, for dim = 1024, speed was 66.2965 gigaflops.\r\nLOG (TestCuFindRowMaxId():cu-matrix-speed-test.cc:264) For CuMatrix::FindRowMaxId<double>, for dim = 1024, speed was 58.442 gigaflops.","created_at":"2016-05-15T14:57:26Z","updated_at":"2016-05-16T13:59:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"284211341ae46e19ceae252cd6611a6bb8b9ec5a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780/commits","review_comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780/comments","review_comment_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/780/comments","statuses_url":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/03ffd242c7988a4e5b897f212316de6db4225823","head":{"label":"kangshiyin:faster-FindRowMaxId","ref":"faster-FindRowMaxId","sha":"03ffd242c7988a4e5b897f212316de6db4225823","user":{"login":"kangshiyin","id":3216836,"avatar_url":"https://avatars.githubusercontent.com/u/3216836?v=3","gravatar_id":"","url":"https://api.github.com/users/kangshiyin","html_url":"https://github.com/kangshiyin","followers_url":"https://api.github.com/users/kangshiyin/followers","following_url":"https://api.github.com/users/kangshiyin/following{/other_user}","gists_url":"https://api.github.com/users/kangshiyin/gists{/gist_id}","starred_url":"https://api.github.com/users/kangshiyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangshiyin/subscriptions","organizations_url":"https://api.github.com/users/kangshiyin/orgs","repos_url":"https://api.github.com/users/kangshiyin/repos","events_url":"https://api.github.com/users/kangshiyin/events{/privacy}","received_events_url":"https://api.github.com/users/kangshiyin/received_events","type":"User","site_admin":false},"repo":{"id":58864354,"name":"kaldi","full_name":"kangshiyin/kaldi","owner":{"login":"kangshiyin","id":3216836,"avatar_url":"https://avatars.githubusercontent.com/u/3216836?v=3","gravatar_id":"","url":"https://api.github.com/users/kangshiyin","html_url":"https://github.com/kangshiyin","followers_url":"https://api.github.com/users/kangshiyin/followers","following_url":"https://api.github.com/users/kangshiyin/following{/other_user}","gists_url":"https://api.github.com/users/kangshiyin/gists{/gist_id}","starred_url":"https://api.github.com/users/kangshiyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangshiyin/subscriptions","organizations_url":"https://api.github.com/users/kangshiyin/orgs","repos_url":"https://api.github.com/users/kangshiyin/repos","events_url":"https://api.github.com/users/kangshiyin/events{/privacy}","received_events_url":"https://api.github.com/users/kangshiyin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kangshiyin/kaldi","description":"This is now the official location of the Kaldi project.","fork":true,"url":"https://api.github.com/repos/kangshiyin/kaldi","forks_url":"https://api.github.com/repos/kangshiyin/kaldi/forks","keys_url":"https://api.github.com/repos/kangshiyin/kaldi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kangshiyin/kaldi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kangshiyin/kaldi/teams","hooks_url":"https://api.github.com/repos/kangshiyin/kaldi/hooks","issue_events_url":"https://api.github.com/repos/kangshiyin/kaldi/issues/events{/number}","events_url":"https://api.github.com/repos/kangshiyin/kaldi/events","assignees_url":"https://api.github.com/repos/kangshiyin/kaldi/assignees{/user}","branches_url":"https://api.github.com/repos/kangshiyin/kaldi/branches{/branch}","tags_url":"https://api.github.com/repos/kangshiyin/kaldi/tags","blobs_url":"https://api.github.com/repos/kangshiyin/kaldi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kangshiyin/kaldi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kangshiyin/kaldi/git/refs{/sha}","trees_url":"https://api.github.com/repos/kangshiyin/kaldi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kangshiyin/kaldi/statuses/{sha}","languages_url":"https://api.github.com/repos/kangshiyin/kaldi/languages","stargazers_url":"https://api.github.com/repos/kangshiyin/kaldi/stargazers","contributors_url":"https://api.github.com/repos/kangshiyin/kaldi/contributors","subscribers_url":"https://api.github.com/repos/kangshiyin/kaldi/subscribers","subscription_url":"https://api.github.com/repos/kangshiyin/kaldi/subscription","commits_url":"https://api.github.com/repos/kangshiyin/kaldi/commits{/sha}","git_commits_url":"https://api.github.com/repos/kangshiyin/kaldi/git/commits{/sha}","comments_url":"https://api.github.com/repos/kangshiyin/kaldi/comments{/number}","issue_comment_url":"https://api.github.com/repos/kangshiyin/kaldi/issues/comments{/number}","contents_url":"https://api.github.com/repos/kangshiyin/kaldi/contents/{+path}","compare_url":"https://api.github.com/repos/kangshiyin/kaldi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kangshiyin/kaldi/merges","archive_url":"https://api.github.com/repos/kangshiyin/kaldi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kangshiyin/kaldi/downloads","issues_url":"https://api.github.com/repos/kangshiyin/kaldi/issues{/number}","pulls_url":"https://api.github.com/repos/kangshiyin/kaldi/pulls{/number}","milestones_url":"https://api.github.com/repos/kangshiyin/kaldi/milestones{/number}","notifications_url":"https://api.github.com/repos/kangshiyin/kaldi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kangshiyin/kaldi/labels{/name}","releases_url":"https://api.github.com/repos/kangshiyin/kaldi/releases{/id}","deployments_url":"https://api.github.com/repos/kangshiyin/kaldi/deployments","created_at":"2016-05-15T13:54:53Z","updated_at":"2016-05-15T13:55:05Z","pushed_at":"2016-05-16T13:18:13Z","git_url":"git://github.com/kangshiyin/kaldi.git","ssh_url":"git@github.com:kangshiyin/kaldi.git","clone_url":"https://github.com/kangshiyin/kaldi.git","svn_url":"https://github.com/kangshiyin/kaldi","homepage":"http://kaldi-asr.org","size":102034,"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":"kaldi-asr:master","ref":"master","sha":"b111a8baf83248ad0320e4bc071034848f3bdb73","user":{"login":"kaldi-asr","id":11650082,"avatar_url":"https://avatars.githubusercontent.com/u/11650082?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldi-asr","html_url":"https://github.com/kaldi-asr","followers_url":"https://api.github.com/users/kaldi-asr/followers","following_url":"https://api.github.com/users/kaldi-asr/following{/other_user}","gists_url":"https://api.github.com/users/kaldi-asr/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldi-asr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldi-asr/subscriptions","organizations_url":"https://api.github.com/users/kaldi-asr/orgs","repos_url":"https://api.github.com/users/kaldi-asr/repos","events_url":"https://api.github.com/users/kaldi-asr/events{/privacy}","received_events_url":"https://api.github.com/users/kaldi-asr/received_events","type":"Organization","site_admin":false},"repo":{"id":34275045,"name":"kaldi","full_name":"kaldi-asr/kaldi","owner":{"login":"kaldi-asr","id":11650082,"avatar_url":"https://avatars.githubusercontent.com/u/11650082?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldi-asr","html_url":"https://github.com/kaldi-asr","followers_url":"https://api.github.com/users/kaldi-asr/followers","following_url":"https://api.github.com/users/kaldi-asr/following{/other_user}","gists_url":"https://api.github.com/users/kaldi-asr/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldi-asr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldi-asr/subscriptions","organizations_url":"https://api.github.com/users/kaldi-asr/orgs","repos_url":"https://api.github.com/users/kaldi-asr/repos","events_url":"https://api.github.com/users/kaldi-asr/events{/privacy}","received_events_url":"https://api.github.com/users/kaldi-asr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaldi-asr/kaldi","description":"This is now the official location of the Kaldi project.","fork":false,"url":"https://api.github.com/repos/kaldi-asr/kaldi","forks_url":"https://api.github.com/repos/kaldi-asr/kaldi/forks","keys_url":"https://api.github.com/repos/kaldi-asr/kaldi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaldi-asr/kaldi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaldi-asr/kaldi/teams","hooks_url":"https://api.github.com/repos/kaldi-asr/kaldi/hooks","issue_events_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/events{/number}","events_url":"https://api.github.com/repos/kaldi-asr/kaldi/events","assignees_url":"https://api.github.com/repos/kaldi-asr/kaldi/assignees{/user}","branches_url":"https://api.github.com/repos/kaldi-asr/kaldi/branches{/branch}","tags_url":"https://api.github.com/repos/kaldi-asr/kaldi/tags","blobs_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/{sha}","languages_url":"https://api.github.com/repos/kaldi-asr/kaldi/languages","stargazers_url":"https://api.github.com/repos/kaldi-asr/kaldi/stargazers","contributors_url":"https://api.github.com/repos/kaldi-asr/kaldi/contributors","subscribers_url":"https://api.github.com/repos/kaldi-asr/kaldi/subscribers","subscription_url":"https://api.github.com/repos/kaldi-asr/kaldi/subscription","commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaldi-asr/kaldi/contents/{+path}","compare_url":"https://api.github.com/repos/kaldi-asr/kaldi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaldi-asr/kaldi/merges","archive_url":"https://api.github.com/repos/kaldi-asr/kaldi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaldi-asr/kaldi/downloads","issues_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues{/number}","pulls_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls{/number}","milestones_url":"https://api.github.com/repos/kaldi-asr/kaldi/milestones{/number}","notifications_url":"https://api.github.com/repos/kaldi-asr/kaldi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaldi-asr/kaldi/labels{/name}","releases_url":"https://api.github.com/repos/kaldi-asr/kaldi/releases{/id}","deployments_url":"https://api.github.com/repos/kaldi-asr/kaldi/deployments","created_at":"2015-04-20T17:23:16Z","updated_at":"2016-05-16T13:46:52Z","pushed_at":"2016-05-16T13:01:48Z","git_url":"git://github.com/kaldi-asr/kaldi.git","ssh_url":"git@github.com:kaldi-asr/kaldi.git","clone_url":"https://github.com/kaldi-asr/kaldi.git","svn_url":"https://github.com/kaldi-asr/kaldi","homepage":"http://kaldi-asr.org","size":116491,"stargazers_count":632,"watchers_count":632,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":378,"mirror_url":null,"open_issues_count":69,"forks":378,"open_issues":69,"watchers":632,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780"},"html":{"href":"https://github.com/kaldi-asr/kaldi/pull/780"},"issue":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/issues/780"},"comments":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/issues/780/comments"},"review_comments":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780/comments"},"review_comment":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/780/commits"},"statuses":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/03ffd242c7988a4e5b897f212316de6db4225823"}}}}