Code from my masters thesis. Solves a 3D system of linear equations on the CPU and GPU using SYCL.
The sycl solver mainly uses the ProGTX/sycl-gtx library to compile the SYCL kernels to OpenCL kernels during execution. The library is included in this project in the extern/sycl-gtx folder. I have modified some parts of the code to improve performance.
git clone https://github.com/Bricktricker/gpu-solve.git
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make GpuSolve-cpu GpuSolve-gtx
If you want to use a diffrent SYCL implementation, build the GpuSolve-sycl target and adjust the compiler settings beforehand.
After building, the executables can be found in the build/src/ directory. Launch the application with ./GpuSolve-cpu <path/to/config>.
The config file describes the problem structure, an example can be found at examples/data-2nd_order.conf. Description of the config file lines:
- Number of v-cycles
- Tolerance, currently unused
- X dimension of the grid
- Y dimension of the grid
- Z dimension of the grid
- Switch between linear (0), non-linear (1) and Newton (2) problem
- Number of pre-smoothing steps
- Number of post-smoothing steps
- Relaxation coefficient
- Gamma for the non-linear part
- The seven stencil values, seperated by space
- Stencil value offsets in the X direction
- Stencil value offsets in the Y direction
- Stencil value offsets in the Z direction