This repository contains benchmark comparisons for Matrix Multiplication and Matrix Factorization (LU Decomposition) using three different approaches:
- Serial: Single-threaded CPU implementation.
- MPI: Parallel CPU implementation using Message Passing Interface.
- CUDA (via ZLUDA): GPU implementation running on AMD hardware using ZLUDA.
- Linux OS (Tested on Ubuntu Mint)
- GCC
- MPI (e.g., MPICH or OpenMPI) Documnetation
- CUDA Toolkit (for
nvcccompiler) Documentation - ZLUDA: For running CUDA applications on AMD GPUs.
multiply/: Contains Matrix Multiplication benchmarks.factor/: Contains Matrix Factorization (LU Decomposition) benchmarks.check_version/: Simple utility to check CUDA version.zluda/: (Excluded from git) Directory containing ZLUDA binaries.
Navigate to the multiply directory and run the comparison script:
cd multiply
./run_comparison.shThis will compile and run:
serial_matmul.cmpi_matmul.ccuda_matmul.cu(via ZLUDA)
Navigate to the factor directory and run the comparison script:
cd factor
./run_factor_comparison.shThis will compile and run:
serial_lu.cmpi_lu.ccuda_lu.cu(via ZLUDA)
This project uses ZLUDA to run unmodified CUDA binaries on AMD ROCm. The run_with_zluda.sh helper script sets up the necessary environment variables (LD_LIBRARY_PATH) to inject ZLUDA libraries.