Comments (8)
The context here is that we support a wide range of modern C++ parallel models, including Kokkos, TBB, OpenMP and C++17 Parallel STL, so adding an Alpaka port means people can compare a lot of things at once using tests that were created by people who are relatively objective. https://youtu.be/bXeDfA21-VA shows some examples of things that have been done with them before.
I also suspect that the total porting time is less than a day, since the total amount of code that needs porting is very small (nstream is ~3 lines, transpose is ~4 lines, stencil is ~4 lines plus code generation, etc).
from kernels.
Hi @jeffhammond - I'm helping with some benchmarks for PIConGPU and Alpaka, so I'll take a look at these kernel ports in more detail.
from kernels.
btw @jyoung3131 if you want to be a PIC boss, you'll see there is a PIC PRK with a limited number of implementations. @hattom added SOA and AOS versions in Fortran that would be great targets to study with the C++ stuff.
PRK % find . -name "pic*" | grep -v dep
./AMPI/PIC/pic.c
./Cxx11/pic-sycl.cc
./Cxx11/pic.cc
./MPI1/PIC-static/pic.c
./FORTRAN/pic_soa.F90
./FORTRAN/pic.F90
./FORTRAN/pic-openmp.F90
./FORTRAN/pic_soa-openmp.F90
./FG_MPI/PIC-static/pic.c
./SERIAL/PIC/pic.c
./OPENMP/PIC/pic.c
from kernels.
Porting guide
Do it in this order:
- nstream (1D parallelism)
- transpose (2D parallelism)
- stencil (2D parallelism)
- dgemm (3D parallelism) optional
- p2p (complicated parallelism)
Look at the Python implementations if you want the easiest-to-read code as a reference. Or look at whatever language you like best. The simplest implementation will be named "kernel.suffix".
Detail
transpose
It must use a standard row or column major storage. In distributed memory, you must decompose in only one dimension so the communication is all-to-all.
Blocking for cache/TLB is useful on CPUs. GPU optimizations are tricky. The CUDA implementation is not optimal. It will be fixed eventually.
stencil
Figure out one pattern (e.g. star with radius=2) and then tell me so I can roll it into the code generator.
dgemm
Read https://www.cs.utexas.edu/users/flame/pubs/blis3_ipdps14.pdf and implement that if you can but I've never done this and won't judge you at all for just writing triple loops and calling it good.
p2p
Look at slides 30-37 of https://drive.google.com/file/d/1yNQiG-wjBI4Iu6yDPV6WcQL-r8Yt9RSV/view if it helps to understand the design space. Hyperplane method is probably best on GPU unless you use cooperative groups or do other tricky stuff.
from kernels.
Fantastic idea! Lets ping @psychocoderHPC @BenjaminW3 @j-stephan @bernhardmgruber @sbastrakov @bussmann.
Background: The Parallel Reserach Kernels (ParRes Kernels) are a set of simple programs that can be used to explore the features of a parallel platform: https://github.com/ParRes/Kernels
from kernels.
Great idea. Will do our best to support this. Happy Easter holidays from Germany!
from kernels.
LOVE the PIC PRK stuff, @jeffhammond!
If one dares to use some more 'experimental' work I recommend looking into combining Alpaka wit Llama to tackle SoA/AoS and other data layout decisions with a single source code.
Thanks for looking into this, @jyoung3131 , please coordinate with the Alpaka team, we'll be glad to support this.
from kernels.
@bussmann you forgot to link llama documentation + llama github
from kernels.
Related Issues (20)
- redo Travis CI infrastructure
- fix Numba p2p
- Broken link in Readme to docs HOT 1
- debug multi-GPU SYCL nstream HOT 1
- add DG1 helper
- Use LoopVectorization in julia stencil / transpose HOT 7
- Scala deprecation warnings HOT 1
- nvhpc offloading on RH8/p9+V100 system: supported? HOT 5
- Data Race due to num_error variable HOT 3
- CUDA stencil inefficiency (compared to SYCL) HOT 3
- pic-sycl.cc uses C99 HOT 1
- OpenMP Synch_p2p depends on x86 HOT 7
- Fortran MPI p2p is buggy HOT 1
- transpose-petsc crashes HOT 1
- Cannot find -lkokkos HOT 6
- MPI transpose with datatypes HOT 1
- prk_ranges.h:59:24: error: ‘ranges::views’ has not been declared HOT 7
- hip platform run stencil occurs "Segementation fault(core dumped)" HOT 3
- Kokkos kernels don't work under Kokkos version 4.3.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kernels.