Title: Design of specific backends (GPU, OpenMP, Coarrays, etc.) · Issue #1996 · lcompilers/lpython · GitHub
Open Graph Title: Design of specific backends (GPU, OpenMP, Coarrays, etc.) · Issue #1996 · lcompilers/lpython
X Title: Design of specific backends (GPU, OpenMP, Coarrays, etc.) · Issue #1996 · lcompilers/lpython
Description: So far most of the code that our backends (C, LLVM, WASM) generate does not depend on any third party API, it just uses native operations (such as arithmetic) of the given platform, sometimes libc, and sometimes it calls into our own run...
Open Graph Description: So far most of the code that our backends (C, LLVM, WASM) generate does not depend on any third party API, it just uses native operations (such as arithmetic) of the given platform, sometimes libc,...
X Description: So far most of the code that our backends (C, LLVM, WASM) generate does not depend on any third party API, it just uses native operations (such as arithmetic) of the given platform, sometimes libc,...
Opengraph URL: https://github.com/lcompilers/lpython/issues/1996
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design of specific backends (GPU, OpenMP, Coarrays, etc.)","articleBody":"So far most of the code that our backends (C, LLVM, WASM) generate does not depend on any third party API, it just uses native operations (such as arithmetic) of the given platform, sometimes `libc`, and sometimes it calls into our own runtime library.\r\n\r\nWe now have to figure out how to target backends that make heavy use of a custom 3rd party API (typically C) to do all the operations. Examples of such backends:\r\n\r\n* SymEngine symbolic backend\r\n* GPU and other accelerator backends\r\n* OpenMP\r\n* Coarrays\r\n* pthreads\r\n* CPython interoperability\r\n\r\nThe two approaches are:\r\n\r\n* We represent the operations in ASR, either with backend explicit nodes, or with higher level operations (parallel do concurrent). Each backend then has to implement translating the operation to specific API calls (say OpenMP or SymEngine).\r\n* We do this translation as ASR-\u003eASR pass. The input is, say, do concurrent, and the output is ASR with specific calls to OpenMP (if OpenMP is used) or GPU API (if GPU offloading is used). All backends work with it.\r\n\r\nWe can use a combination of the two approaches. But the second approach is preferable, since we can see how the code looks like after the transformation (of \"do concurrent\" into OpenMP or CUDA) and optionally apply more ASR-\u003eASR passes further optimizing the code; we can use our verify() to check correctness; and all backends will work with no special support.","author":{"url":"https://github.com/certik","@type":"Person","name":"certik"},"datePublished":"2023-06-21T23:26:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1996/lpython/issues/1996"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0ac184e8-fe41-b81a-9aad-a719bb77f0d7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C776:8D142:25308AA:30D41A2:696B160C |
| html-safe-nonce | ab50e35f635ae2e45c4b447bb3d7ff3ba8207f8360f9c66c922f9d0de5d945af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzc2OjhEMTQyOjI1MzA4QUE6MzBENDFBMjo2OTZCMTYwQyIsInZpc2l0b3JfaWQiOiI2MDI0ODA5Nzg2MTk0NDY2MzE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ba7b87d3b45edf3f891982c52140be885c1fdc5aba18db2308572216f1f100c5 |
| hovercard-subject-tag | issue:1768664712 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lcompilers/lpython/1996/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd7dc5198bbb8d6c2c599bfd2410a6cbead22b5d2a0be650447724f7a364f993/lcompilers/lpython/issues/1996 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd7dc5198bbb8d6c2c599bfd2410a6cbead22b5d2a0be650447724f7a364f993/lcompilers/lpython/issues/1996 |
| og:image:alt | So far most of the code that our backends (C, LLVM, WASM) generate does not depend on any third party API, it just uses native operations (such as arithmetic) of the given platform, sometimes libc,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | certik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/lcompilers/lpython git https://github.com/lcompilers/lpython.git |
| octolytics-dimension-user_id | 96538276 |
| octolytics-dimension-user_login | lcompilers |
| octolytics-dimension-repository_id | 442864346 |
| octolytics-dimension-repository_nwo | lcompilers/lpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 442864346 |
| octolytics-dimension-repository_network_root_nwo | lcompilers/lpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width