@@ -348,6 +348,29 @@ def benchmark_model(
348
348
export_path : Optional [str ] = None ,
349
349
disable_kv_cache_overrides : bool = False ,
350
350
) -> Dict :
351
+ """
352
+ Run benchamrk of a given model on a given engine
353
+
354
+ :param model_path: Path or stub to the model
355
+ :param batch_size: Batch size, Defaults to 1.
356
+ :param input_shapes: Shape of the input. Defaults to "".
357
+ :param num_cores: Number of cores to use. Defaults to None.
358
+ :param scenario: The "type" of scenario to use. Defaults to "sync".
359
+ :param time: Total run-time to run the benchmark for. Defaults to 10.
360
+ :param warmup_time: Time to run the engine before running benchmarks. Defaults to 2.
361
+ :param num_streams: Number of streams. Defaults to None.
362
+ :param sequence_length: Sequence length for text-gen. Defaults to None.
363
+ :param input_ids_length: Length of the input ids. Defaults to 1.
364
+ :param thread_pinning: The hardware to pin for threading. Defaults to "core".
365
+ :param engine: The type of engine to use. Defaults to our proprietary DEEPSPARSE_ENGINE.
366
+ :param internal_kv_cache: Runs the benchmark with or w/o the kv cache. Defaults to True.
367
+ :param quiet: Verbose option if set to False. Defaults to False.
368
+ :param export_path: Path to save the results. Defaults to None.
369
+ :param disable_kv_cache_overrides: Option to override the kv cache. Defaults to False.
370
+ :returns: Dictionary of benchmarked metrics
371
+
372
+ """
373
+
351
374
if quiet :
352
375
set_logging_level (logging .WARN )
353
376
0 commit comments