ModelProfile
- class lib.infer.profile.ModelProfile(plugin: ExtractPlugin, max_batch_size: int = 128, channels_last: bool = False, run_time: int = 10)
Bases:
objectBenchmark a single PyTorch GPU plugin for inference
- Parameters:
plugin (ExtractPlugin) – The plugin to benchmark for inference
max_batch_size (int) – The maximum batch size to benchmark to
channels_last (bool) –
Trueif the input to the plugin is channels lastrun_time (int) – The amount of time, in seconds, to benchmark the plugin at each batch size
Attributes Summary
The amount of time, in seconds, that benchmarks were ran per batch
Methods Summary
__call__()Runs benchmarking through the plugin, stores the data and outputs stats
Attributes Documentation
- run_time
The amount of time, in seconds, that benchmarks were ran per batch
Methods Documentation
- __call__() None
Runs benchmarking through the plugin, stores the data and outputs stats
- Return type:
None
- __call__() None
Runs benchmarking through the plugin, stores the data and outputs stats
- Return type:
None
- channels_last
True if the plugin expects channels last input
- property run_time: int
The amount of time, in seconds, that benchmarks were ran per batch