This section describes how to use APIs to perform profiling in offline inference scenarios. The following methods are supported.
Profiling Method |
Description |
|---|---|
Method 1: Collecting and flushing profile data |
Write the collected profile data to a file, parse the file by using the msprof tool, and display the profile data analysis result. |
Method 2: Using msproftx APIs to collect and flush profile data |
To locate the performance bottleneck of your application or the upper-layer framework application, call the msproftx APIs during the profiling process (between the aclprofStart and aclprofStop calls). msproftx is used to record the time span of specific events during application running and write data to a profile data file. You can use msprof to parse the file and export the profile data. |
Method 3: Subscribing to operator information |
Parse the collected profile data and write it to a pipeline. Then, users read the data to the memory and call APIs to obtain it. |