{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/math/issues/1059","repository_url":"https://api.github.com/repos/stan-dev/math","labels_url":"https://api.github.com/repos/stan-dev/math/issues/1059/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/math/issues/1059/comments","events_url":"https://api.github.com/repos/stan-dev/math/issues/1059/events","html_url":"https://github.com/stan-dev/math/pull/1059","id":375323083,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NzkzNTA1","number":1059,"title":"Add GPU Cholesky Primitive","user":{"login":"SteveBronder","id":5857231,"node_id":"MDQ6VXNlcjU4NTcyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5857231?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveBronder","html_url":"https://github.com/SteveBronder","followers_url":"https://api.github.com/users/SteveBronder/followers","following_url":"https://api.github.com/users/SteveBronder/following{/other_user}","gists_url":"https://api.github.com/users/SteveBronder/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveBronder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveBronder/subscriptions","organizations_url":"https://api.github.com/users/SteveBronder/orgs","repos_url":"https://api.github.com/users/SteveBronder/repos","events_url":"https://api.github.com/users/SteveBronder/events{/privacy}","received_events_url":"https://api.github.com/users/SteveBronder/received_events","type":"User","site_admin":false},"labels":[{"id":233078045,"node_id":"MDU6TGFiZWwyMzMwNzgwNDU=","url":"https://api.github.com/repos/stan-dev/math/labels/feature","name":"feature","color":"bfd4f2","default":false},{"id":1015369023,"node_id":"MDU6TGFiZWwxMDE1MzY5MDIz","url":"https://api.github.com/repos/stan-dev/math/labels/gpu","name":"gpu","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"SteveBronder","id":5857231,"node_id":"MDQ6VXNlcjU4NTcyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5857231?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveBronder","html_url":"https://github.com/SteveBronder","followers_url":"https://api.github.com/users/SteveBronder/followers","following_url":"https://api.github.com/users/SteveBronder/following{/other_user}","gists_url":"https://api.github.com/users/SteveBronder/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveBronder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveBronder/subscriptions","organizations_url":"https://api.github.com/users/SteveBronder/orgs","repos_url":"https://api.github.com/users/SteveBronder/repos","events_url":"https://api.github.com/users/SteveBronder/events{/privacy}","received_events_url":"https://api.github.com/users/SteveBronder/received_events","type":"User","site_admin":false},"assignees":[{"login":"SteveBronder","id":5857231,"node_id":"MDQ6VXNlcjU4NTcyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5857231?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveBronder","html_url":"https://github.com/SteveBronder","followers_url":"https://api.github.com/users/SteveBronder/followers","following_url":"https://api.github.com/users/SteveBronder/following{/other_user}","gists_url":"https://api.github.com/users/SteveBronder/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveBronder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveBronder/subscriptions","organizations_url":"https://api.github.com/users/SteveBronder/orgs","repos_url":"https://api.github.com/users/SteveBronder/repos","events_url":"https://api.github.com/users/SteveBronder/events{/privacy}","received_events_url":"https://api.github.com/users/SteveBronder/received_events","type":"User","site_admin":false},{"login":"rok-cesnovar","id":28476796,"node_id":"MDQ6VXNlcjI4NDc2Nzk2","avatar_url":"https://avatars0.githubusercontent.com/u/28476796?v=4","gravatar_id":"","url":"https://api.github.com/users/rok-cesnovar","html_url":"https://github.com/rok-cesnovar","followers_url":"https://api.github.com/users/rok-cesnovar/followers","following_url":"https://api.github.com/users/rok-cesnovar/following{/other_user}","gists_url":"https://api.github.com/users/rok-cesnovar/gists{/gist_id}","starred_url":"https://api.github.com/users/rok-cesnovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rok-cesnovar/subscriptions","organizations_url":"https://api.github.com/users/rok-cesnovar/orgs","repos_url":"https://api.github.com/users/rok-cesnovar/repos","events_url":"https://api.github.com/users/rok-cesnovar/events{/privacy}","received_events_url":"https://api.github.com/users/rok-cesnovar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2018-10-30T05:06:27Z","updated_at":"2018-12-31T20:19:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/stan-dev/math/pulls/1059","html_url":"https://github.com/stan-dev/math/pull/1059","diff_url":"https://github.com/stan-dev/math/pull/1059.diff","patch_url":"https://github.com/stan-dev/math/pull/1059.patch"},"body":"## Summary\r\n\r\nAdds the gpu cholesky decomposition primitive and it's associated kernel. This also includes two small bug fixes for the inverse cholesky.\r\n\r\nWhen users define `STAN_OPENCL` during compilation the cpu based cholesky will be replaced by the gpu version of the cholesky. \r\n```cpp\r\nm = cholesky_decompose(x);\r\n```\r\nSo users code will stay the same, but will then have access to the gpu routines. This was decided in favor of including a `cholesky_decompose_gpu` method since if users want fine grain decision making we can always introduce it later, but it will be harder to remove it.\r\n\r\nThe Cholesky's gpu algorithm is recursive, where The parameters `block`, `divider`, and `min_block` act as tuning parameters for the recursive step of the GPU based Cholesky decompostion. The matrix is subset by the `block` size, and if the `block` size is less than `min_block` then the Cholesky decomposition on the GPU is computed using that submatrix. If `block` is greater than `block_size` then `cholesky_decompose` is run again with `block` equal to `block/divider`. Once the Cholesky decomposition is computed, the full Cholesky is created by propagating the Cholesky forward as given in the reference report below.\r\n\r\nhttps://github.com/SteveBronder/stancon2018/blob/master/report.pdf\r\n\r\n## Tests\r\n\r\nAssuming OpenCL is setup and the preferred device has an index of 0, tests can be run with\r\n\r\n```bash\r\necho STAN_OPENCL=true>> make/local\r\necho OPENCL_PLATFORM_ID=0>> make/local\r\necho OPENCL_DEVICE_ID=0>> make/local\r\n./runTests.py ./test/unit/math/gpu/cholesky_decompose_test.cpp \r\n```\r\n`cholesky_decompose_cpu_vs_gpu`\r\n- Tests whether cpu and gpu outputs are close to each other\r\n\r\n`cholesky_decompose_small`\r\n- Runs the `cholesky_decompose_test` tester on small input matrices\r\n\r\n`cholesky_decompose_big`\r\n- Runs the `cholesky_decompose_test` tester on input matrices of size 500, 1000, 2000\r\n\r\nThe `cholesky_decompose_test` tester checks whether the GPU implementation's max error for any cell in the cholesky decomposition relative to Eigen's LLT method is less than 1E-8.\r\n\r\n## Side Effects\r\n\r\nNone\r\n\r\n## Checklist\r\n\r\n- [x] Math issue #1058 \r\n\r\n- [x] Copyright holder: (fill in copyright holder information)\r\n\r\n- Rok Češnovar and Erik Štrumbelj (Faculty of Computer and Information Science, University of Ljubljana)\r\n- Steve Bronder\r\n\r\n- [x] the basic tests are passing\r\n\r\n    - unit tests pass (to run, use: `./runTests.py test/unit`)\r\n    - header checks pass, (`make test-headers`)\r\n    - docs build, (`make doxygen`)\r\n    - code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality) checks (`make cpplint`)\r\n\r\n- [x] the code is written in idiomatic C++ and changes are documented in the doxygen\r\n\r\n- [x] the new changes are tested\r\n"},"comment":{"url":"https://api.github.com/repos/stan-dev/math/issues/comments/450687164","html_url":"https://github.com/stan-dev/math/pull/1059#issuecomment-450687164","issue_url":"https://api.github.com/repos/stan-dev/math/issues/1059","id":450687164,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY4NzE2NA==","user":{"login":"SteveBronder","id":5857231,"node_id":"MDQ6VXNlcjU4NTcyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5857231?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveBronder","html_url":"https://github.com/SteveBronder","followers_url":"https://api.github.com/users/SteveBronder/followers","following_url":"https://api.github.com/users/SteveBronder/following{/other_user}","gists_url":"https://api.github.com/users/SteveBronder/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveBronder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveBronder/subscriptions","organizations_url":"https://api.github.com/users/SteveBronder/orgs","repos_url":"https://api.github.com/users/SteveBronder/repos","events_url":"https://api.github.com/users/SteveBronder/events{/privacy}","received_events_url":"https://api.github.com/users/SteveBronder/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T20:19:20Z","updated_at":"2018-12-31T20:19:20Z","author_association":"CONTRIBUTOR","body":"Looks like this is failing because of an upstream cmdstan issue on windows that is hitting other PRs as well\r\n\r\nOurs:\r\nhttp://d1m1s1b1.stat.columbia.edu:8080/blue/organizations/jenkins/CmdStan/detail/downstream_tests/300/pipeline\r\n\r\nEx: matern32\r\nhttp://d1m1s1b1.stat.columbia.edu:8080/blue/organizations/jenkins/CmdStan/detail/downstream_tests/301/pipeline"}}
{"actor":{"display_login":"SteveBronder"}}