Skip to content

Getting Started

This guide will help you build and run your first Mini-ImagePipe project.

Prerequisites

Before building Mini-ImagePipe, ensure you have:

  • CMake >= 3.18
  • CUDA Toolkit >= 11.0 with nvcc in your PATH
  • C++17 compatible compiler (GCC, Clang, or MSVC)
  • NVIDIA GPU with compute capability >= 7.0 (Volta or newer)

Build

We provide three CMake presets for different build configurations:

bash
# Debug build (includes debug symbols, assertions)
cmake --preset default
cmake --build --preset default

# Release build (optimized for performance)
cmake --preset release
cmake --build --preset release

# Native GPU only (faster compile, targets only your GPU)
cmake --preset minimal
cmake --build --preset minimal

Manual Build

If you prefer manual configuration:

bash
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j$(nproc)

Build Options

OptionDescriptionDefault
CMAKE_BUILD_TYPEBuild type (Debug/Release)Release
CMAKE_CUDA_ARCHITECTURESTarget GPU architecturesAll supported

Run

Run Demo

bash
./build/demo_pipeline

The demo pipeline demonstrates:

  • Loading an image
  • Applying resize → grayscale → Gaussian blur → Sobel edge detection
  • Saving the output

Run Tests

bash
# Using ctest
ctest --preset release

# Or run directly
./build/mini_image_pipe_tests

Our test suite includes:

  • Property-based tests (100 randomized iterations per operator)
  • Memory manager stress tests
  • Pipeline integration tests
  • Scheduler correctness tests

Troubleshooting

CUDA not found

If CMake cannot find CUDA:

bash
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Out of memory during build

For systems with limited RAM, reduce parallel jobs:

bash
cmake --build --preset release -- -j2

Unsupported GPU architecture

If your GPU is older than Volta (sm_70), you may need to modify CMakeLists.txt:

cmake
set(CMAKE_CUDA_ARCHITECTURES 60)  # For Pascal GPUs

What's Next?

Released under the MIT License.