{"id":13574952,"url":"https://github.com/farscape-project/amrex-sycl","last_synced_at":"2025-04-04T19:30:26.067Z","repository":{"id":173615996,"uuid":"650097643","full_name":"farscape-project/amrex-sycl","owner":"farscape-project","description":"A SYCL plug-in to run AMReX apps on AMD/Nvidia GPUs","archived":false,"fork":false,"pushed_at":"2023-08-08T15:04:30.000Z","size":6665,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-05T10:45:19.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farscape-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-06-06T10:31:39.000Z","updated_at":"2023-06-09T12:37:05.000Z","dependencies_parsed_at":"2024-01-14T04:07:52.635Z","dependency_job_id":null,"html_url":"https://github.com/farscape-project/amrex-sycl","commit_stats":null,"previous_names":["farscape-project/amrex-sycl"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farscape-project%2Famrex-sycl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farscape-project%2Famrex-sycl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farscape-project%2Famrex-sycl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farscape-project%2Famrex-sycl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farscape-project","download_url":"https://codeload.github.com/farscape-project/amrex-sycl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247237606,"owners_count":20906314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:56.947Z","updated_at":"2025-04-04T19:30:24.712Z","avatar_url":"https://github.com/farscape-project.png","language":"Shell","funding_links":[],"categories":["Table of Contents"],"sub_categories":["Tools and Development"],"readme":"# A SYCL plug-in to run AMReX apps on AMD/Nvidia GPUs\n\n_**Nuno Nobre**, Alex Grant, Karthikeyan Chockalingam and Xiaohu Guo_\n\n[![DOI](https://zenodo.org/badge/650097643.svg)](https://zenodo.org/badge/latestdoi/650097643)\n###\n\n[SYCL](https://www.khronos.org/sycl/) unlocks single-source development for\nhardware accelerators by leveraging C++ templated functions, greatly easing the\notherwise laborious task of porting C++ code to heterogeneous architectures.\nThe aim of this work is to show that state of the art scientific applications\nsuch as [AMReX](https://amrex-codes.github.io) can be solely written in SYCL\nwhile still preserving its performance portability features.\n\nWe demonstrate how minimal the extra required development effort can be with\n[AMReX's ElectromagneticPIC tutorial](https://amrex-codes.github.io/amrex/tutorials_html/Particles_Tutorial.html#electromagneticpic).\nThis is due to the tutorial's relevance to plasma fusion but we note that\nall AMReX applications should be able to benefit.\nHere is an illustration of a PIC simulation you can carry out using this code:\n\n![Plasma Oscillations](doc/fig/Langmuir.gif)\n\n_Current-driven Langmuir oscillations at the plasma frequency on a\n32 x 32 x 32 grid with 1 electron per cell. The mesh is coloured after the\namplitude of the oscillating but uniform electric field: from blue (-) to red\n(+)._\n\nThe plug-in consists of a build script and code patches which extend\nAMReX's SYCL capability beyond Intel GPUs.\nWe support two open-source SYCL compiler and runtime frameworks:\n- [DPC++](https://github.com/intel/llvm) (proprietary solutions, e.g. the\n[Intel oneAPI DPC++/C++ Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html)\nand its [plugins](https://codeplay.com/solutions/oneapi/), should also work);\n- [Open SYCL](https://github.com/OpenSYCL/OpenSYCL)\n(formerly known as hipSYCL).\n\nThe plug-in has been tested on _all_ the high performance computing GPUs\ngenerally available at the beginning of 2023:\n\n- Nvidia: V100 and A100;\n- AMD: MI100, MI210 and MI250.\n\nSince AMReX also includes native support for both the Nvidia CUDA and the AMD\nHIP programming models, a direct comparison against those is trivial. This plot\nshows that the SYCL implementation is as fast as those vendor alternatives.\n\n![Performance Results](doc/fig/Performance.png)\n\n_SYCL vs CUDA and HIP. Performance comparison for a Langmuir oscillations\nsimulation on a 128 x 128 x 128 grid with 64 electrons per cell and 100 time\nsteps. The AMD MI100 is an order of magnitude slower due to the lack of support\nfor FP64 atomics on that GPU. The PIC loop is always faster on the SYCL\nimplementation, but the particle initialisation routine is notably slower,\nmeaning the small number of iterations results in slower execution times for\nSYCL on some GPUs such as the A100. For a detailed per-routine comparison for\neach GPU, see [here](doc/fig/PerformancePerRoutine.pdf)._\n\nTo learn how to install and use the plug-in, continue reading\n[here](doc/use_plugin.md).\n\n## Acknowledgments\n\n- Joe Todd ([@joeatodd](https://github.com/joeatodd)),\nRod Burns ([@rodburns](https://github.com/rodburns)),\nand the Codeplay developer team\n([@codeplaysoftware](https://github.com/codeplaysoftware))\nfor helping to identify an issue with slow FP atomics on GPUs, and for\ndeveloping the Nvidia and AMD support plugins for DPC++;\n- Aksel Alpay ([@illuhad](https://github.com/illuhad)),\nand the Open SYCL developer team\n([@opensycl](https://github.com/opensycl))\nfor cultivating a welcoming community,\nfor reviewing and suggesting improvements to our contributions to Open SYCL,\nand for developing Open SYCL;\n- Andrew Myers ([@atmyers](https://github.com/atmyers)),\nAxel Huebl ([@ax3l](https://github.com/ax3l)),\nWeiqun Zhang ([@weiqunzhang](https://github.com/weiqunzhang)),\nand the AMReX developer team\n([@amrex-codes](https://github.com/amrex-codes))\nfor welcoming and reviewing our contributions to AMReX and its tutorials,\nand for developing AMReX;\n- UKAEA ([@ukaea](https://github.com/ukaea)),\nand the FARSCAPE project\n([@farscape-project](https://github.com/farscape-project))\nfor funding this work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarscape-project%2Famrex-sycl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarscape-project%2Famrex-sycl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarscape-project%2Famrex-sycl/lists"}