This demonstrates how to transform a GPU kernel into multi-GPU kernel with unified memory.
The gemm
source comes from PolyBench/GPU 1.0 test suite.
gemm.cu
: original PolyBench gemm program.gemm_multi_gpu.cu
: multi-GPU gemm program.compile.sh
: script used for compilingutil.hpp
: a C++ library, simplifies the transformation
see the comments in util.hpp
- compile
./compile.sh
which generate binaries in
./bin/
- run
# run the gemm for 4-GPUs, policy (RM, RM, UM) bin/gemm-4-20480-RM-RM-UM