{"action":"created","issue":{"url":"https://api.github.com/repos/CEED/libCEED/issues/108","repository_url":"https://api.github.com/repos/CEED/libCEED","labels_url":"https://api.github.com/repos/CEED/libCEED/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/CEED/libCEED/issues/108/comments","events_url":"https://api.github.com/repos/CEED/libCEED/issues/108/events","html_url":"https://github.com/CEED/libCEED/pull/108","id":347218486,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1ODk1OTcy","number":108,"title":"[WIP] Cuda Backend","user":{"login":"Steven-Roberts","id":11356722,"node_id":"MDQ6VXNlcjExMzU2NzIy","avatar_url":"https://avatars1.githubusercontent.com/u/11356722?v=4","gravatar_id":"","url":"https://api.github.com/users/Steven-Roberts","html_url":"https://github.com/Steven-Roberts","followers_url":"https://api.github.com/users/Steven-Roberts/followers","following_url":"https://api.github.com/users/Steven-Roberts/following{/other_user}","gists_url":"https://api.github.com/users/Steven-Roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/Steven-Roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steven-Roberts/subscriptions","organizations_url":"https://api.github.com/users/Steven-Roberts/orgs","repos_url":"https://api.github.com/users/Steven-Roberts/repos","events_url":"https://api.github.com/users/Steven-Roberts/events{/privacy}","received_events_url":"https://api.github.com/users/Steven-Roberts/received_events","type":"User","site_admin":false},"labels":[{"id":844274805,"node_id":"MDU6TGFiZWw4NDQyNzQ4MDU=","url":"https://api.github.com/repos/CEED/libCEED/labels/GPU","name":"GPU","color":"b60205","default":false},{"id":775972104,"node_id":"MDU6TGFiZWw3NzU5NzIxMDQ=","url":"https://api.github.com/repos/CEED/libCEED/labels/backend","name":"backend","color":"4a65bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-08-03T00:27:58Z","updated_at":"2018-08-17T02:58:19Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/CEED/libCEED/pulls/108","html_url":"https://github.com/CEED/libCEED/pull/108","diff_url":"https://github.com/CEED/libCEED/pull/108.diff","patch_url":"https://github.com/CEED/libCEED/pull/108.patch"},"body":"I finished merging in most of the new active/passive changes into the cuda branch, so it seems like a good time to start discussing the merge into master.  There are still a few lingering issues that will need to be resolved first.\r\n\r\n- For efficiency, I have custom versions of `CeedBasisApply` and `CeedQFunctionApply` that accept Vectors as arguments and work over all elements at once.\r\n- In order to be compatible with the current API, I have `CeedBasisApply` work as a light wrapper that calls my custom optimized function.  I wanted to do the same for `CeedQFunctionApply` but the current parameters don't offer enough info to call my version (missing the element strides for each input `u` and output `v`).  I figured it would be better to work on allowing batching than trying to hack this together.  Also, this is why the tests currently fail.\r\n- Getting a cuda qfunction to the cuda backend through the c api was a bit tricky.  The solution I use uses some macros that detect if the code is being compiled with cuda.\r\nhttps://github.com/CEED/libCEED/blob/f815a8afaef76789af6f4f147084698c745ec92a/include/ceed.h#L275-L307\r\nhttps://github.com/CEED/libCEED/blob/6474b817cfb6eefde27f34b5603f58872ad89d9d/examples/ceed/ex1.c#L39-L40\r\n- I haven't tried mixing fortran and the cuda backend.  There may be difficulties with getting the cuda qfunction pointer through fortran\r\n- Perhaps these issues could be avoided by using NVRTC"},"comment":{"url":"https://api.github.com/repos/CEED/libCEED/issues/comments/413743594","html_url":"https://github.com/CEED/libCEED/pull/108#issuecomment-413743594","issue_url":"https://api.github.com/repos/CEED/libCEED/issues/108","id":413743594,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzc0MzU5NA==","user":{"login":"jeremylt","id":25011573,"node_id":"MDQ6VXNlcjI1MDExNTcz","avatar_url":"https://avatars3.githubusercontent.com/u/25011573?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremylt","html_url":"https://github.com/jeremylt","followers_url":"https://api.github.com/users/jeremylt/followers","following_url":"https://api.github.com/users/jeremylt/following{/other_user}","gists_url":"https://api.github.com/users/jeremylt/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremylt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremylt/subscriptions","organizations_url":"https://api.github.com/users/jeremylt/orgs","repos_url":"https://api.github.com/users/jeremylt/repos","events_url":"https://api.github.com/users/jeremylt/events{/privacy}","received_events_url":"https://api.github.com/users/jeremylt/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T02:58:19Z","updated_at":"2018-08-17T02:58:19Z","author_association":"MEMBER","body":"I believe right now we are letting backends get that effect by passing in a pointer to the array of the vector and arguments that correspond to multiple elements.\r\n\r\nFor example:\r\n\r\n```\r\nierr = CeedBasisApply(basis, nelem, CEED_NOTRANSPOSE,\r\n              CEED_EVAL_INTERP, array_in, array_out);\r\n```\r\n\r\nand \r\n\r\n```\r\nierr = CeedQFunctionApply(op->qf, Q*nelem,\r\n                          (const CeedScalar * const*) impl->indata,\r\n                          impl->outdata); CeedChk(ierr);\r\n```"}}
{"actor":{"display_login":"jeremylt"}}