TrixiParticles.jl icon indicating copy to clipboard operation
TrixiParticles.jl copied to clipboard

Road to TrixiParticles.jl on GPUs

Open efaulhaber opened this issue 1 year ago • 1 comments

  • [x] Make array types in structs generic. Change types like Array{ELTYPE, 2} to type parameters. #486
  • [x] Recursively convert (adapt) Semidiscretization object to GPU types with Adapt.jl. #492
  • [x] #532
  • [x] #533
  • [x] Minimally invasive working GPU implementation with KernelAbstractions.jl without neighborhood search. Two alternatives: Either #493 using plain kernels for everything or #534 hiding the kernels in the @threaded macro.
  • [x] Rework neighborhood search to be more efficient and GPU-compatible. https://github.com/trixi-framework/PointNeighbors.jl/issues/26
  • [x] Make SolutionSavingCallback work on GPUs (#579).
  • [x] Make TLSPH work on GPUs.
  • [x] Benchmark, profile and optimize interactions on GPUs.
  • [ ] Avoid synchronization. For example, fluid-solid and solid-solid interactions have no race conditions, so all *-solid interaction kernels can be spawned on the GPU without synchronization. The same holds for all *-fluid and *-boundary interactions. However, this should happen after optimization, since we will lose timers for each individual interaction. Also, we will only see a benefit for multi-physics simulations, as a simple fluid-boundary simulation can't run any two non-trivial interactions without synchronization. Note that a single fluid-* kernel might also be able to improve performance.

efaulhaber avatar Apr 02 '24 12:04 efaulhaber

Here are some remaining To-Dos from #723:

  • [ ] The SchoenbergQuarticSplineKernel does not work on GPUs (https://github.com/JuliaGPU/CUDA.jl/issues/2681 and https://github.com/JuliaGPU/Metal.jl/issues/550).
  • [ ] Some weird Heisenbug breaking the 3D dam break on Metal (https://github.com/JuliaGPU/Metal.jl/issues/549). But only on my machine, apparently.
  • [ ] The open boundary system is not GPU-compatible (https://github.com/trixi-framework/PointNeighbors.jl/issues/20).
  • [ ] Monaghan-Kajtar BC don't work with Float32 (https://github.com/JuliaGPU/Metal.jl/issues/552).
  • [ ] Intel GPUs just report a segfault in the first example (https://buildkite.com/julialang/trixiparticles/builds/121#01956711-2f9f-45c6-a3ce-b591179eac07).

efaulhaber avatar Mar 06 '25 09:03 efaulhaber