Skip to content

ParallelStencil.jlArchitecture-agnostic high-performance stencil computations

Write high-level code once, run it on GPUs and CPUs, from a single thread to thousands of GPUs.

ParallelStencil.jl

What is ParallelStencil.jl? ​

ParallelStencil empowers domain scientists to write architecture-agnostic high-level code for parallel high-performance stencil computations on GPUs and CPUs. Performance similar to CUDA C / HIP can be achieved, which is typically a large improvement over the performance reached when using only CUDA.jl or AMDGPU.jl GPU Array programming. In conjunction with ImplicitGlobalGrid.jl, the same Julia code can run on a single CPU thread or on thousands of GPUs/CPUs. See the Overview for more details.

Installation ​

ParallelStencil can be installed directly with the Julia package manager from the Julia REPL:

julia
import Pkg; Pkg.add("ParallelStencil")

Dependencies ​

ParallelStencil relies on the Julia packages CUDA.jl [1, 2], AMDGPU.jl, Metal.jl, KernelAbstractions.jl, Polyester.jl, MacroTools.jl, CellArrays.jl, StaticArrays.jl and Enzyme.jl. However, thanks to Julia's package extensions, only CellArrays.jl, MacroTools.jl and StaticArrays.jl are fixed dependencies that are automatically installed with ParallelStencil; the other packages are only required when using the respective backends or features.

Questions, comments and discussions ​

To discuss technical issues, please post on Julia Discourse in the GPU topic or the Julia at Scale topic or in the #gpu or #hpc channels on the Julia Slack. To discuss numerical/domain-science issues, please post on Julia Discourse in the Numerics topic or the Modelling & Simulations topic or whichever other topic fits best your issue.

Contributing ​

Contributions are welcome, be it new miniapps, math-close notation for other numerical methods (see the tiny FiniteDifferences1D submodule as an example), convenience features or core improvements! Please open an issue to discuss your idea beforehand. A pull request should address an issue in its completeness and blend nicely into the existing project (community guidelines such as ColPrac can serve as inspiration).

Citing ​

If you use ParallelStencil in your work, please cite [3]. The BibTeX entry and further publications are found in the References.

Funding ​

The development of this package is supported by the GPU4GEO and ∂GPU4GEO PASC projects. More information about the GPU4GEO project can be found on the GPU4GEO website.