HIGHLIGHT — GPU COMPUTE
CUDA Image Pipelines
Two CUDA milestones: a full GPU image-processing pipeline and GPU triangle-strip generation — each benchmarked host vs device vs shared memory, in Release, across problem sizes.
Captures — release build, measured
■ before ■ afterHost → device with shared memory, Release build.
Triangle-list processing, host → device, Release build.
GPU work done the way it should be done: benchmark first, then implement, then prove the win. The project opened with a CPU-vs-GPU benchmarking sprint across problem sizes, then moved into two implementation milestones — every variant timed in Release.
MS1 — Image processing pipeline (17.9x)
A complete image-processing pipeline implemented three times over: host (CPU), device (GPU), and device with shared memory — so every speedup claim has a controlled baseline. The pipeline stages:
- RGB → grayscale conversion, thresholding, and invert
- Morphological erode / dilate
- Gaussian blur and Sobel edge detection
- Connected-component center-point extraction — ending in an actual application: counting coins in a photograph
| Variant | Time (Release) | Speedup |
|---|---|---|
| Host (CPU) | 10,981.9 ms | 1.0x |
| Device + shared memory | 612.1 ms | 17.9x |
The shared-memory variant is the interesting one: convolution stages (blur, Sobel, morphology) re-read the same neighbourhoods repeatedly, so staging tiles in shared memory converts redundant global-memory traffic into on-chip reads.
MS2 — Polygon stripping (165.8x)
The second milestone generates triangle strips from a raw triangle list — a mesh-processing task with heavy per-element work that parallelises well once the data layout cooperates.
| Variant | Time (Release) | Speedup |
|---|---|---|
| Host (CPU) | 99,329.8 ms | 1.0x |
| Device (GPU) | 599.1 ms | 165.8x |
The strip-processing path itself also ran ~12.9x faster on device.
Why it matters
The habit that transfers: never claim a GPU win without a fair CPU baseline in Release. Combined with the GPU skinning and animation work in the engine, this covers both halves of GPU programming — graphics-pipeline work in HLSL and general compute in CUDA. The source lives in private repositories under course policy; demo walkthroughs are available on request.