Model Performance Evaluation
The hrt_model_exec perf is used to test the model performance.
In this mode, you does not need to input data, and the program automatically constructs the input tensor according to the model, and the tensor data are random numbers.
By default, the program runs 200 frames of data in a single thread. When perf_time is specified, frame_count is disabled, and the program will run for the specified period of time and then exit.
Outputs the latency and the frame rate of the model. The program prints the performance information every 200 frames: max, min, and average values of latency. If < 200 frames, prints once before the programs ends.
The program finally outputs the running-related data, including number of program threads, number of frames, total model inference time, average latency of model inference, and frame rate.
When conducting performance testing (perf), if the input is not specified, the tool will randomly construct it internally. However, if the model itself has a strong dependence on the input, the randomly constructed input may cause the program to core dump.
Usage
Parameters Introduction
profile_path Description
After setting the profile_path parameter and the tool runs normally, profiler.log and profiler.csv files will be generated. The files include the following parameters:
-
ucp_version:UCP and HBRT version.
-
perf_result:Record perf results.
- running_condition:Operating environment information.
- model_latency: Model node time consumption statistics.
- processor_latency:Model processor time consumption statistics.
- task_latency:Model task time-consuming statistics.
Usage Example
Performance testing only supports running one model at a time. When model_file contains multiple models, please set the model_name parameter to specify it.
