Help Center/ Atlas 300 Application (Model 3000)/ IDE-daemon-client Command Reference/ Sending Profiling Items to the Host by Using IDE Daemon
Updated on 2022-03-13 GMT+08:00

Sending Profiling Items to the Host by Using IDE Daemon

Function

Sends profiling items to the host by using IDE daemon and start profiling.

Syntax

IDE-daemon-client --host <host_ip>:<port> --profile "<params>"

Parameter

Table 1 Parameter description

Parameter

Description

Mandatory or Not

Default Value

--host

  • host_ip: specifies the IP address of the host.
  • port: specifies the port number.

Yes

The default value of port is 22118.

--profile

Specifies profiling items in params.

Yes

-

Prerequisites

Mind Studio has been installed and project files compiled on Mind Studio have been copied to the directory on the host in advance.

For example, if the project name on Mind Studio is testProject and files generated after the project is compiled are in Home directory of the Mind Studio installation user/tools/projects/testProject/out, you need to upload files in Home directory of the Mind Studio installation user/tools/projects/testProject/out to the /home/HwHiAiUser/HIAI_PROJECTS/workspace_mind_studio/testProject/out directory on the host and rename the executable file as workspace_mind_studio_Project name (for example, workspace_mind_studio_testProject). In addition, you need to run the chmod +x workspace_mind_studio_testProject command to grant the execute permission to the executable file.

Example

  1. Log in to the Mind Studio server as the Mind Studio installation user.
  2. Run the following commands to set the environment variables:
    export  LD_LIBRARY_PATH=~/tools/che/ddk/ddk/uihost/lib
    export  PATH=$PATH:~/tools/che/ddk/ddk/uihost/bin
  3. Run the IDE-daemon-client command.
    The following is only an example. You need to change the parameters to actual values.
    • Replace xx.xx.xx.xx after --host with the actual IP address of the host server.
    • /home/ascend indicates the home directory of the Mind Studio installation user. Change it to the actual value.
    • Replace /xxx/xxx after app_dir with the path of the app on the host, for example, /home/HwHiAiUser/HIAI_PROJECTS/workspace_mind_studio/testProject/out.
    • Replace app with the app name in the directory specified by app_dir, for example, workspace_mind_studio_testProject.
    • Replace the path after result_dir with the actual directory on the host server. After running the command, you can view the profiling result in the directory specified by result_dir.
    IDE-daemon-client --host xx.xx.xx.xx:22118 --profile "{\"ddk_dir\": \"/home/ascend/tools/che/ddk/ddk\",\"app\": \"workspace_mind_studio_testProject\",\"app_dir\": \"/home/HwHiAiUser/HIAI_PROJECTS/workspace_mind_studio/testProject/out\", \"umode\": \"MIND\",\"result_dir\": \"/home/ascend/tools/projects/test_ycm\",\"peripheral_profiling\": \"\",\"ts_cpu_profiling\": \"off\",\"ai_cpu_profiling\": \"off\",\"rts_profiling\": \"on\",\"ai_core_profiling_mode\": \"\",\"ai_core_profiling\": \"off\",\"hiai_engine_profiling\": \"off\",\"framework_profiling\": \"off\",\"ctrl_cpu_profiling\": \"off\",\"profiling_mode\": \"online\",\"llc_profiling\": \"off\",\"ddr_profiling\": \"on\",\"deviceid\": \"0\", \"ddr_profiling_events\": \"read,write\", \"hiai_engine_profiling\": \"on\", \"analysis_target\": \"Launch Application\"}"

    For details about the meanings of profiling items, see the "Profiling" section in Ascend 310 Mind Studio Auxiliary Tools.