Exporting Profiling Results
You can print the profiling results on the screen, or use a script to save them in CSV format by taking the following steps:
- Log in to the server as the HwHiAiUser user created during installation.
- Go to the /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit/tools/profiler/profiler_tool/analysis/interface directory.
- Export CSV files.
The following is the command syntax of basic options. For details about others, see Scripts and Interfaces.
python3.7.5 get_msvp_info.pyc --save_file --project=$output_data --deviceid=$device_id --data_type=$export_data_type
For example, you can run the following command to export the Runtime API calls:
python3.7.5 get_msvp_info.pyc --save_file --project=/home/HwHiAiUser/tools/out --deviceid=0 --data_type=runtime_api
The options in the preceding command are described as follows:
- --project: path for storing exported CSV files of the profiling results.
- --deviceid: device ID.
- --data_type: profiling results to export. For details, see Table 7-4.
--deviceid needs to be set to a specific device ID when the profiling results in the path specified by --project are associated to multiple devices.
In the exported ge_basic_{device_id}.csv, ai_core_op_summary_{device_id}.csv and op_counter_{device_id}.csv files, values in the Model Name column may be empty.
Table 7-4 Profiling results and target CSV file namesProfiling Result
data_type
Target CSV File
Runtime API calls
-
--data_type=runtime_api
runtime_api_{device_id}.csv
Task Scheduler
-
--data_type=task_scheduler
task_scheduler_{device_id}.csv
AI Core
Task-based AI Core
--data_type=ai_core_pmu_events
ai_core_pmu_events_{device_id}.csv
Sample-based AI Core
--data_type=ai_core_pmu_events
ai_core_pmu_events_{device_id}.csv
Operator data provided by the GE component
GE task and graph
--data_type=ge_basic
ge_basic_{device_id}.csv
Information of GE loading a model
--data_type=ge_model_load
ge_model_load_{device_id}.csv
Time taken by GE to load a model
--data_type=ge_model_time
ge_model_time_{device_id}.csv
CPU PMU events and hotspot functions
Ctrl CPU PMU (Performance Monitoring Unit) events
--data_type=control_cpu_pmu_events
control_cpu_pmu_events_{device_id}.csv
Top 5 Ctrl CPU hotspot functions
--data_type=control_cpu_top_functions
control_cpu_top_functions_{device_id}.csv
AI CPU PMU events
--data_type=ai_cpu_pmu_events
ai_cpu_pmu_events_{device_id}.csv
Top 5 AI CPU hotspot functions
--data_type=ai_cpu_top_functions
ai_cpu_top_functions_{device_id}.csv
TS CPU PMU events
--data_type=ts_cpu_pmu_events
ts_cpu_pmu_events_{device_id}.csv
Peripheral
NIC
--data_type=nic
nic_{device_id}.csv
DVPP
--data_type=dvpp
dvpp_{device_id}.csv
Hardware
LLC bandwidth
--data_type=llc
llc_{device_id}.csv
LLC capacity
(AI CPU)
--data_type=llc_aicpu
llc_aicpu_{device_id}.csv
LLC capacity
(Ctrl CPU)
--data_type=llc_ctrlcpu
llc_ctrlcpu_{device_id}.csv
Read/write bandwidth (DDR)
--data_type=ddr
ddr_{device_id}.csv
CPU utilization
System AI CPU and Ctrl CPU
--data_type=sys_cpu_usage
sys_cpu_usage_{device_id}.csv
Process CPU (top 50 data records)
--data_type=process_cpu_usage
process_cpu_usage_{device_id}.csv
Memory
System Memory Summary
--data_type=sys_mem
sys_mem_{device_id}.csv
Process Memory Info
--data_type=process_mem
process_mem_{device_id}.csv
AscendCL
-
--data_type=acl
acl_{device_id}.csv
AI Core Operator Summary
-
--data_type=ai_core_op_summary
ai_core_op_summary_{device_id}.csv
AI Core Operator Statistics
-
--data_type=op_counter
op_counter_{device_id}.csv
Top-down information
-
--data_type=top_down
top_down_{device_id}.csv
All profiling results
-
--data_type=all
all_data_{device_id}.csv