Skip to content

samples: add OpenVX graph pipelining CPU+GPU sample - #7

Open
simonCatBot wants to merge 1 commit into
developfrom
feature/pipelining-sample
Open

samples: add OpenVX graph pipelining CPU+GPU sample#7
simonCatBot wants to merge 1 commit into
developfrom
feature/pipelining-sample

Conversation

@simonCatBot

Copy link
Copy Markdown
Owner

Summary

Adds a new C++ sample under samples/c_samples/pipelining that demonstrates the OpenVX vx_khr_pipelining extension on a mixed CPU+GPU workload.

The sample runs the same vision graph in two modes:

  • --pipeline 0 — synchronous vxProcessGraph loop (baseline).
  • --pipeline 1QUEUE_AUTO pipelined enqueue/dequeue with multiple input/output buffers.

Graph: RGB -> ColorConvert -> ChannelExtract(Y) -> Box3x3 -> U8

Both paths compute an identical per-frame checksum aggregate, and the pipelined path reports a higher fps so the benefit is immediately visible.

What was added

  • samples/c_samples/pipelining/pipelining.cpp — the sample application.
  • samples/c_samples/pipelining/CMakeLists.txt — build file matching the existing canny sample.
  • Updated samples/c_samples/README.md with build/run instructions.

Verification performed

Built and tested locally on a Radeon gfx1151 GPU and on the CPU-only backend:

Mode Backend fps (60 frames @ 640x480) checksum aggregate
sync HIP ~447 2309715656
pipe HIP ~503 2309715656
sync CPU ~352 2304694854
pipe CPU ~531 2304694854

Both backends pass the checksum-equality test and show measurable speed-up when pipelining is enabled.

Checklist

  • Builds on HIP backend.
  • Builds on CPU-only backend.
  • --pipeline 0 and --pipeline 1 produce the same aggregate checksum.
  • --pipeline 1 reports higher fps than --pipeline 0.
  • Does not touch any existing library code; only adds a new sample.

@simonCatBot
simonCatBot force-pushed the feature/pipelining-sample branch from 8b51ead to ab8c164 Compare August 6, 2026 17:38
@daniellegillai

Copy link
Copy Markdown

Tested on Radeon RX 9070 XT / Ryzen 9 9950X 16-Core Processor, using TheRock Nightly 10.1.0 2026-08-05:

Mode Backend fps (60 frames @ 640x480) checksum aggregate
sync HIP ~422 2309715656
pipe HIP ~456 2309715656
sync CPU ~450 2304694854
pipe CPU ~498 2304694854

Both backends pass the checksum-equality test and show speed-up when pipelining is enabled. One note is that CPU outperformed HIP backend, @kiritigowda is that reasonable?

@simonCatBot
simonCatBot force-pushed the feature/pipelining-sample branch 3 times, most recently from 4b11c3c to 00322f5 Compare August 6, 2026 22:06
Add samples/c_samples/pipelining, a self-contained demonstration of the
vx_khr_pipelining extension on a mixed CPU+GPU workload. The same vision
graph (RGB -> ColorConvert -> ChannelExtract(Y) -> Box3x3 -> U8) is run
synchronously with vxProcessGraph (--pipeline 0) and asynchronously with
QUEUE_AUTO enqueue/dequeue (--pipeline 1).

Both paths report identical per-frame checksums so correctness can be
verified, while the pipelined path prints a higher fps to make the
performance benefit visible.

Also update samples/c_samples/README.md with build/run instructions.
@simonCatBot
simonCatBot force-pushed the feature/pipelining-sample branch from 00322f5 to 7f75313 Compare August 6, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants