Skip to content

Conversation

@mgumowsk
Copy link
Contributor

What does this PR do?

Fixes #418

Change overview

  • Adds options to specify threads, streams, performance_hint to benchmark.app
  • Reporting in ms
  • Async support

Before changes

uv run python examples/metrics/benchmark.py   data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml   data/coco128/images/train2017   --device CPU  --test-runs 100
Found 128 images in data/coco128/images/train2017
OpenVINO Runtime
	build: 2025.3.0-19807-44526285f24-releases/2025/3
Reading model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml
The model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml is loaded to CPU
	Number of model infer requests: 2
The model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml is loaded to CPU
	Number of model infer requests: 2
Starting warm-up...
Running 100 test inferences...
  Completed 10/100
  Completed 20/100
  Completed 30/100
  Completed 40/100
  Completed 50/100
  Completed 60/100
  Completed 70/100
  Completed 80/100
  Completed 90/100
  Completed 100/100

============================================================
               🚀 PERFORMANCE METRICS REPORT 🚀
============================================================

📊 Model Loading:
   Load Time: 0.282s

⚙️  Processing Times (mean ± std):
   Preprocess:  0.000s ± 0.000s
   Inference:   0.023s ± 0.002s
   Postprocess: 0.000s ± 0.000s

📈 Total Time Statistics:
   Mean:  0.023s ± 0.002s
   Min:   0.021s
   Max:   0.035s

🎯 Performance Summary:
   Total Frames: 100
   FPS:          43.36

============================================================

After changes

uv run python examples/metrics/benchmark.py   data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml   data/coco128/images/train2017   --device CPU --performance-hint THROUGHPUT --test-runs 100 --async --inference-only --max-num-requests `nproc` --num-streams `nproc`
Reading model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml
The model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml is loaded to CPU
	Number of model infer requests: 16
The model data/otx_2.6.0_models/detection_rtmdet_tiny_fp16/openvino.xml is loaded to CPU
	Number of model infer requests: 16
Benchmarking in inference only mode (inputs filling are not included in measurement loop).
Input: image, shape: [1, 3, 640, 640], precision: f32, layout: NCHW
Compiled model input partial_shape: [1,?,?,3], layout: NCHW
Using tensor shape: [1, 224, 224, 3]
Raw tensor shape: (1, 224, 224, 3), dtype: float32
Starting warm-up...
Running 100 test inferences (async mode, inference only)...
  Submitted 10/100
  Submitted 20/100
  Submitted 30/100
  Submitted 40/100
  Submitted 50/100
  Submitted 60/100
  Submitted 70/100
  Submitted 80/100
  Submitted 90/100
  Submitted 100/100
  Waiting for all requests to complete...
  Completed 100/100

============================================================
           🚀 PERFORMANCE METRICS REPORT 🚀
============================================================

📊 Execution Devices: [CPU]
   Count: 100 iterations
   Duration: 1424.65 ms

📈 Latency:
   Average: 14.25 ms

🎯 Throughput: 70.19 FPS
============================================================

@mgumowsk mgumowsk requested a review from a team as a code owner December 15, 2025 08:19
@github-actions github-actions bot added tests Related to tests python python related changes docs Related to documentation samples labels Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Related to documentation python python related changes samples tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Benchmark app improvements

3 participants