Add support for single export format benchmark (#18740)

Signed-off-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
Co-authored-by: Laughing-q <1185102784@qq.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2025-01-29 18:17:19 +05:00 committed by GitHub
parent 74b647828e
commit 3274fe7f2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 4 deletions

View file

@ -661,6 +661,7 @@ class Model(nn.Module):
- int8 (bool): Whether to use int8 precision mode.
- device (str): Device to run the benchmark on (e.g., 'cpu', 'cuda').
- verbose (bool): Whether to print detailed benchmark information.
- format (str): Export format name for specific benchmarking
Returns:
(Dict): A dictionary containing the results of the benchmarking process, including metrics for
@ -686,7 +687,8 @@ class Model(nn.Module):
half=args["half"],
int8=args["int8"],
device=args["device"],
verbose=kwargs.get("verbose"),
verbose=kwargs.get("verbose", False),
format=kwargs.get("format", ""),
)
def export(