Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-configuration performance benchmarking #5858

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Mar 25, 2025

  • Add support for range-based arguments for CPU threads and HW decoder load
  • Implement performance testing across multiple configurations
  • Add best throughput configuration reporting
  • Enhance performance metrics with more detailed statistics
  • Refactor pipeline definitions to support variable HW decoder load

Category:

New feature (non-breaking change which adds functionality)

Description:

  • Add support for range-based arguments for CPU threads and HW decoder load
  • Implement performance testing across multiple configurations
  • Add best throughput configuration reporting
  • Enhance performance metrics with more detailed statistics
  • Refactor pipeline definitions to support variable HW decoder load

Additional information:

Affected modules and functionalities:

  • internal_tools/hw_decoder_bench.py

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
    • TL1_decoder_perf
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@JanuszL
Copy link
Contributor Author

JanuszL commented Mar 25, 2025

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [25999015]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [25999015]: BUILD FAILED

- Add support for range-based arguments for CPU threads and HW decoder load
- Implement performance testing across multiple configurations
- Add best throughput configuration reporting
- Enhance performance metrics with more detailed statistics
- Refactor pipeline definitions to support variable HW decoder load

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Mar 25, 2025

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [25999773]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [25999773]: BUILD PASSED


@pipeline_def(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipeline definitions could be outside of the loops, for better readibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

print(f"Total time: {best_result['total_time']:.6f} sec")
print(f"Throughput: {best_result['total_throughput']:.2f} frames/sec")
else:
print("No results to display")
Copy link
Contributor

@jantonguirao jantonguirao Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an idea, print the results for all parameters in a way that can be easily parsed and plotted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate which format you have in mind?

parser.add_argument(
"-j",
dest="num_threads",
help="CPU threads. Can be a single value (e.g. 4) or range 'start:end:step' (e.g. 1:8:2)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd mention that the end of the range is included (which is not typically the case in Python ranges)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

)


def parse_range_arg(arg_str, use_float=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a suggestion: maybe just parse_fn=int here instead of use_float

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Janusz Lisiecki <[email protected]>
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.

4 participants