Skip to content

sheralskumar/gpu-benchmarking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple CPU/GPU Benchmarking Project

A CPU/GPU benchmarking project using OpenCL, OpenMP, and C++ with Python automation.
Demonstrates low-level GPU programming, kernel execution, and automation for performance testing. CI/CD test automation using GitHub actions for both Windows (build only) and Linux (build & execute).

Requirements

  • C++ compiler supporting C++17 (MSVC, GCC, Clang)
  • CMake ≥ 3.10
  • OpenCL SDK (AMD, NVIDIA, Intel, or generic)
  • OpenMP runtime library installed (e.g., libomp-dev on Linux)
  • Python 3.x (for automation scripts)
  • Windows 11 OR Linux

Building and Running

1. Build the C++ Benchmark

Open a terminal in the project root. Create and navigate to the build directory:

mkdir build
cd build

2. Configure the project with CMake:

cmake ..

3. Build the executable:

cmake --build .

The executable will be created in build/ as benchmark.exe.

4. Running

From Terminal:

./build/benchmark [device_index] [vector_size]
  • device_index (optional, default 0): GPU device to use

  • vector_size (optional, default 2^26): Number of elements in the vectors

Example:

./build/benchmark 0 8192

From Python Automation Script:

Navigate to the automation/ folder. Run the script:

python run_benchmarks.py

Results saved to automation\benchmark_results.csv

About

Simple GPU/CPU Benchmarking Project using OpenCL, OpenMP, and C++ with Python automation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors