{"action":"created","comment":{"url":"https://api.github.com/repos/halide/Halide/pulls/comments/29350760","id":29350760,"diff_hunk":"@@ -0,0 +1,29 @@\n+target datalayout = \"e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64\"","path":"src/runtime/renderscript_dev.ll","position":null,"original_position":1,"commit_id":"09e6be0bc128231a6f719499c983a58c939b8aaf","original_commit_id":"6106a5583ac55697f0dc3d69e3a22dae19634d29","user":{"login":"steven-johnson","id":328955,"avatar_url":"https://avatars.githubusercontent.com/u/328955?v=3","gravatar_id":"","url":"https://api.github.com/users/steven-johnson","html_url":"https://github.com/steven-johnson","followers_url":"https://api.github.com/users/steven-johnson/followers","following_url":"https://api.github.com/users/steven-johnson/following{/other_user}","gists_url":"https://api.github.com/users/steven-johnson/gists{/gist_id}","starred_url":"https://api.github.com/users/steven-johnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven-johnson/subscriptions","organizations_url":"https://api.github.com/users/steven-johnson/orgs","repos_url":"https://api.github.com/users/steven-johnson/repos","events_url":"https://api.github.com/users/steven-johnson/events{/privacy}","received_events_url":"https://api.github.com/users/steven-johnson/received_events","type":"User","site_admin":false},"body":"Probably should add that explanation as a comment in the code.\n\nOn Tue, Apr 28, 2015 at 8:31 PM, Alexander Aprelev <notifications@github.com\n> wrote:\n\n> In src/runtime/renderscript_dev.ll\n> <https://github.com/halide/Halide/pull/761#discussion_r29308276>:\n>\n> > @@ -0,0 +1,29 @@\n> > +target datalayout = \"e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64\"\n>\n> Actually, those directives are needed in renderscript_dev.ll file. I put\n> them back in 09e6be0\n> <https://github.com/halide/Halide/commit/09e6be0bc128231a6f719499c983a58c939b8aaf>\n> .\n>\n> Reason is that Renderscript code generation is done via compile_to_src, on\n> a different path from CodeGen_LLVM::compile(), so\n> CodeGen_Renderscript_Dev::get_target_triple() and get_data_layout() are not\n> really being used. The methods have to be defined, though, as they are\n> declared as abstract in parent classes.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/halide/Halide/pull/761/files#r29308276>.\n>\n","created_at":"2015-04-29T16:00:52Z","updated_at":"2015-04-29T16:00:52Z","html_url":"https://github.com/halide/Halide/pull/761#discussion_r29350760","pull_request_url":"https://api.github.com/repos/halide/Halide/pulls/761","_links":{"self":{"href":"https://api.github.com/repos/halide/Halide/pulls/comments/29350760"},"html":{"href":"https://github.com/halide/Halide/pull/761#discussion_r29350760"},"pull_request":{"href":"https://api.github.com/repos/halide/Halide/pulls/761"}}},"pull_request":{"url":"https://api.github.com/repos/halide/Halide/pulls/761","id":33908212,"html_url":"https://github.com/halide/Halide/pull/761","diff_url":"https://github.com/halide/Halide/pull/761.diff","patch_url":"https://github.com/halide/Halide/pull/761.patch","issue_url":"https://api.github.com/repos/halide/Halide/issues/761","number":761,"state":"open","locked":false,"title":"Renderscript Codegen and runtime.","user":{"login":"aam","id":381137,"avatar_url":"https://avatars.githubusercontent.com/u/381137?v=3","gravatar_id":"","url":"https://api.github.com/users/aam","html_url":"https://github.com/aam","followers_url":"https://api.github.com/users/aam/followers","following_url":"https://api.github.com/users/aam/following{/other_user}","gists_url":"https://api.github.com/users/aam/gists{/gist_id}","starred_url":"https://api.github.com/users/aam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aam/subscriptions","organizations_url":"https://api.github.com/users/aam/orgs","repos_url":"https://api.github.com/users/aam/repos","events_url":"https://api.github.com/users/aam/events{/privacy}","received_events_url":"https://api.github.com/users/aam/received_events","type":"User","site_admin":false},"body":"This PR adds Renderscript Codegen, RS-compatible BitWriter, runtime support, some simple IR-validation JIT tests and AOT tests that run on the device.\r\n\r\nApologize for the PR size, I initially thought about splitting this into two pull requests: one for Codegen, another for BitWriter, but that looked awkward as you won't be able to do much with just RS Codegen because you need BitWriter to actually run code on the device.\r\n\r\nRenderScript BitWriter source code was taken from Renderscript open-source code repository.\r\nRenderScript runtime API(src/runtime/mini_rs.h) corresponds to Lollipop release. Some 3-dimension API calls are only part of relatively modern RenderScript API(device_api=23).\r\n\r\nCurrently(and this is just the beginning) two image formats/schedule types are supported:\r\n* 4-channel 3-dimension interleaved image, which maps to 2-dimension 4-byte wide RGBA Renderscript image format. Schedule for Funcs operating on interleaved image have to be vectorized over c-coordinate, so that generated Renderscript API-calls GetElementAt_uchar4/SetElementAt_uchar4 are applicable.\r\n* 3-dimension planar image, which maps to 3-dimension 1-byte Renderscript image format. Schedule for Funcs operating on planar image should not be vectorized, so that 1-byte wide GetElementAt_uchar/SetElementAt_uchar are applicable.\r\n\r\nThank you.","created_at":"2015-04-22T22:32:42Z","updated_at":"2015-04-29T16:00:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9c1f320060ca678df29c6d9775b3c97bd8280e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/halide/Halide/pulls/761/commits","review_comments_url":"https://api.github.com/repos/halide/Halide/pulls/761/comments","review_comment_url":"https://api.github.com/repos/halide/Halide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/halide/Halide/issues/761/comments","statuses_url":"https://api.github.com/repos/halide/Halide/statuses/09e6be0bc128231a6f719499c983a58c939b8aaf","head":{"label":"halide:rs","ref":"rs","sha":"09e6be0bc128231a6f719499c983a58c939b8aaf","user":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"repo":{"id":5241312,"name":"Halide","full_name":"halide/Halide","owner":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/halide/Halide","description":"a language for image processing and computational photography","fork":false,"url":"https://api.github.com/repos/halide/Halide","forks_url":"https://api.github.com/repos/halide/Halide/forks","keys_url":"https://api.github.com/repos/halide/Halide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/halide/Halide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/halide/Halide/teams","hooks_url":"https://api.github.com/repos/halide/Halide/hooks","issue_events_url":"https://api.github.com/repos/halide/Halide/issues/events{/number}","events_url":"https://api.github.com/repos/halide/Halide/events","assignees_url":"https://api.github.com/repos/halide/Halide/assignees{/user}","branches_url":"https://api.github.com/repos/halide/Halide/branches{/branch}","tags_url":"https://api.github.com/repos/halide/Halide/tags","blobs_url":"https://api.github.com/repos/halide/Halide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/halide/Halide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/halide/Halide/git/refs{/sha}","trees_url":"https://api.github.com/repos/halide/Halide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/halide/Halide/statuses/{sha}","languages_url":"https://api.github.com/repos/halide/Halide/languages","stargazers_url":"https://api.github.com/repos/halide/Halide/stargazers","contributors_url":"https://api.github.com/repos/halide/Halide/contributors","subscribers_url":"https://api.github.com/repos/halide/Halide/subscribers","subscription_url":"https://api.github.com/repos/halide/Halide/subscription","commits_url":"https://api.github.com/repos/halide/Halide/commits{/sha}","git_commits_url":"https://api.github.com/repos/halide/Halide/git/commits{/sha}","comments_url":"https://api.github.com/repos/halide/Halide/comments{/number}","issue_comment_url":"https://api.github.com/repos/halide/Halide/issues/comments{/number}","contents_url":"https://api.github.com/repos/halide/Halide/contents/{+path}","compare_url":"https://api.github.com/repos/halide/Halide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/halide/Halide/merges","archive_url":"https://api.github.com/repos/halide/Halide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/halide/Halide/downloads","issues_url":"https://api.github.com/repos/halide/Halide/issues{/number}","pulls_url":"https://api.github.com/repos/halide/Halide/pulls{/number}","milestones_url":"https://api.github.com/repos/halide/Halide/milestones{/number}","notifications_url":"https://api.github.com/repos/halide/Halide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/halide/Halide/labels{/name}","releases_url":"https://api.github.com/repos/halide/Halide/releases{/id}","created_at":"2012-07-31T04:05:25Z","updated_at":"2015-04-29T15:59:51Z","pushed_at":"2015-04-29T15:59:50Z","git_url":"git://github.com/halide/Halide.git","ssh_url":"git@github.com:halide/Halide.git","clone_url":"https://github.com/halide/Halide.git","svn_url":"https://github.com/halide/Halide","homepage":"http://halide-lang.org","size":127754,"stargazers_count":945,"watchers_count":945,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":171,"mirror_url":null,"open_issues_count":97,"forks":171,"open_issues":97,"watchers":945,"default_branch":"master"}},"base":{"label":"halide:master","ref":"master","sha":"f1011af2c73546ab966b680e88578addf1263e01","user":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"repo":{"id":5241312,"name":"Halide","full_name":"halide/Halide","owner":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/halide/Halide","description":"a language for image processing and computational photography","fork":false,"url":"https://api.github.com/repos/halide/Halide","forks_url":"https://api.github.com/repos/halide/Halide/forks","keys_url":"https://api.github.com/repos/halide/Halide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/halide/Halide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/halide/Halide/teams","hooks_url":"https://api.github.com/repos/halide/Halide/hooks","issue_events_url":"https://api.github.com/repos/halide/Halide/issues/events{/number}","events_url":"https://api.github.com/repos/halide/Halide/events","assignees_url":"https://api.github.com/repos/halide/Halide/assignees{/user}","branches_url":"https://api.github.com/repos/halide/Halide/branches{/branch}","tags_url":"https://api.github.com/repos/halide/Halide/tags","blobs_url":"https://api.github.com/repos/halide/Halide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/halide/Halide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/halide/Halide/git/refs{/sha}","trees_url":"https://api.github.com/repos/halide/Halide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/halide/Halide/statuses/{sha}","languages_url":"https://api.github.com/repos/halide/Halide/languages","stargazers_url":"https://api.github.com/repos/halide/Halide/stargazers","contributors_url":"https://api.github.com/repos/halide/Halide/contributors","subscribers_url":"https://api.github.com/repos/halide/Halide/subscribers","subscription_url":"https://api.github.com/repos/halide/Halide/subscription","commits_url":"https://api.github.com/repos/halide/Halide/commits{/sha}","git_commits_url":"https://api.github.com/repos/halide/Halide/git/commits{/sha}","comments_url":"https://api.github.com/repos/halide/Halide/comments{/number}","issue_comment_url":"https://api.github.com/repos/halide/Halide/issues/comments{/number}","contents_url":"https://api.github.com/repos/halide/Halide/contents/{+path}","compare_url":"https://api.github.com/repos/halide/Halide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/halide/Halide/merges","archive_url":"https://api.github.com/repos/halide/Halide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/halide/Halide/downloads","issues_url":"https://api.github.com/repos/halide/Halide/issues{/number}","pulls_url":"https://api.github.com/repos/halide/Halide/pulls{/number}","milestones_url":"https://api.github.com/repos/halide/Halide/milestones{/number}","notifications_url":"https://api.github.com/repos/halide/Halide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/halide/Halide/labels{/name}","releases_url":"https://api.github.com/repos/halide/Halide/releases{/id}","created_at":"2012-07-31T04:05:25Z","updated_at":"2015-04-29T15:59:51Z","pushed_at":"2015-04-29T15:59:50Z","git_url":"git://github.com/halide/Halide.git","ssh_url":"git@github.com:halide/Halide.git","clone_url":"https://github.com/halide/Halide.git","svn_url":"https://github.com/halide/Halide","homepage":"http://halide-lang.org","size":127754,"stargazers_count":945,"watchers_count":945,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":171,"mirror_url":null,"open_issues_count":97,"forks":171,"open_issues":97,"watchers":945,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/halide/Halide/pulls/761"},"html":{"href":"https://github.com/halide/Halide/pull/761"},"issue":{"href":"https://api.github.com/repos/halide/Halide/issues/761"},"comments":{"href":"https://api.github.com/repos/halide/Halide/issues/761/comments"},"review_comments":{"href":"https://api.github.com/repos/halide/Halide/pulls/761/comments"},"review_comment":{"href":"https://api.github.com/repos/halide/Halide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/halide/Halide/pulls/761/commits"},"statuses":{"href":"https://api.github.com/repos/halide/Halide/statuses/09e6be0bc128231a6f719499c983a58c939b8aaf"}}}}