Welcome to our GSoC 2023 Project - GPU Acceleration for PDE Solvers.
Here we share updates and insights about Google Summer of Code 2023 and the development journey of our project. Stay tuned for the latest on our progress!
 This project, supported by Julia and Google, focuses on accelerating the partial differential equation (PDE) discretization process by parallel programming. The project serves as a GPU accelerator for Trixi.jl, employing CUDA.jl (with support for AMDGPU.jl, OneAPI.jl, and Metal.jl incoming) to achieve high-performance computing.
After one year of development, the original project repository has been refactored into a dependent package named TrixiGPU.jl, primarily aimed at providing various GPU support for Trixi.jl. GPU-related tests are now conducted locally due to constrained resources. Once the package is transferred back to the trixi-framework organization, it will enable remote GPU CI testing using JuliaGPU Buildkite. The package is currently under active development and testing.
We welcome new developers. If you're interested, please contact us!
Based on the discussion, the original naive GPU implementation is planned to be optimized in the following general ways:
Memory coalescing through shared memory
Sparse matrix computation through CSC and CSR
Compensated summation algorithm
The primary challenge of optimization is about precision and performance (i.e., speed). Further research is required to determine how to achieve high precision and high performance at the same time.
GPU support requires type stability of Float32 to achieve better performance. However, type stability for Float32 is not supported in the upstream (i.e., Trixi.jl), which causes errors in some GPU kernels during compilation. We are now beginning to enhance Float32 support in the upstream:
Support for the solvers (focused on Trixi.rhs!) has been completed. See PR#1909 for all the related PRs.
Support for mesh initialization (such as TreeMesh and StructuredMesh) and callbacks is in progress. See PR#2042 for all the discussion.
Rounding Error Analysis in Weak Form Kernel for 1D Equation on GPU, Apr 9, 2024.  (Supplementary Proofs, Apr 14, 2024. 
)
GPU Programming Optimization: Flow Divergence, Memory Coalescing, and Sparse Matrix Computation, Dec 19, 2023. 
Google Summer of Code 2023 Program Certificate, Sep 04, 2023. 
GPU Acceleration for PDE Discretization in Trixi.jl Using CUDA.jl (GSoC Report), Aug 31, 2023.  
 
GPU Acceleration for PDE Discretization in Trixi.jl Using CUDA.jl (GSoC Proposal), Apr 3, 2023.  
Matrix-Vector Representation of Discretization in 1D Linear Advection Equation, Apr 2, 2023.  
The entire project, along with this blog website, is developed and maintained by Huiyu(@huiyuxie). The whole project is under the guidance of two good professors, Hendrik(@ranocha) and Michael(@sloede), from trixi-framework community.
The project also received support from other Julia contributors, including Jesse(@jlchan) from trixi-framework community and Tim(@maleadt) from JuliaGPU community.
Big thanks to all those who have contributed to the development of this project!
If you have questions, suggestions, or are interested in contributing, feel free to reach out our lead developer via email at huiyuxie.sde@gmail.com.