msobjdump
This tool is used to parse and decompress the executable and linkable format (ELF) files generated by Kernel direct scheduling projects (NPU mode) and standard custom operator projects and simple custom operator projects, and display the result information in a readable format, helping developers obtain the kernel file information.
- The ELF file is a file format used for binary files, executable files, object code, shared libraries, and core dumps, such as *.a and *.so files. The ELF file structure is as follows:
- ELF header: describes the structure of the entire file, including the file type, machine type, and version number.
- Program header table: describes various segments in the file, including information about how a program is loaded to the memory for execution.
- Section header table: describes the information about each section in the file, including the code, data, and symbol table of the program.
- If the following faults occur during the use of the tool, analyze and rectify the faults based on the log information:
- No ELF file is found.
- The ELF file permission is incorrect.
- The ELF file exists but cannot be parsed or decompressed.
Applicability
|
Product |
Supported/Unsupported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Tool Installation
- Install the msobjdump tool.
The tool is released with the CANN software package. For details about how to install the CANN software package, see Environment Preparation. The default path is ${INSTALL_DIR}/tools/msobjdump, where Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
- Set environment variables.
- Install the Ascend-CANN-Toolkit package as the root user:
source /usr/local/Ascend/cann/set_env.sh
- Install the Ascend-CANN-Toolkit package as a non-root user:
source ${HOME}/Ascend/cann/set_env.sh
- Install the Ascend-CANN-Toolkit package as the root user:
- Check whether the tool is successfully installed.Run the following command. If --help or -h is displayed, the tool environment is normal and the functions are normal.
msobjdump -h
Command
- Command for parsing the ELF file.
msobjdump --dump-elf <elf_file> [--verbose]
Table 1 Parameters Parameter (Case Sensitive)
Mandatory/Optional
Description
--dump-elf <elf_file>, -d
Yes
Parses the device information contained in the ELF file, such as the file name, file type, file length, and symbol table, and displays the information on the terminal.
<elf_file> indicates the path of the ELF file to be parsed, for example, /home/op_api/lib_api.so. Two printing modes are supported:
- Simple printing: Only some device information is printed by default.
- Full printing: This mode is used together with --verbose to enable the full device information to be displayed on the screen.
The fields to be printed vary according to projects. For details, see Table 4 and Table 5.
--verbose, -V
No
This option must be used together with --dump-elf to enable the function of printing full device information in the ELF file.
- Command for decompressing the ELF file
msobjdump --extract-elf <elf_file> [--out-dir <out_path>]
Table 2 Parameters Parameter (Case Sensitive)
Mandatory/Optional
Description
--extract-elf <elf_file>, -e
Yes
Decompresses device information contained in the ELF file and flushes the file to the output path based on the original folder rules.
<elf_file> indicates the path of the ELF file to be decompressed, for example, /home/op_api/lib_api.so.
- Default path: The decompressed result file is flushed to the current execution path by default.
- Custom path: The --out-dir field can be used together to set the flushing path.
--out-dir <out_path>, -o
No
This option must be used together with --extract-elf to set the path for flushing the decompressed file.
<out_path> indicates the directory of the flushed file, for example, /home/extract/.
NOTE:msobjdump can be called by multiple users concurrently. However, users need to specify different --out-dirs. Otherwise, the flushed content may be overwritten.
- Command for obtaining the list of ELF files
msobjdump --list-elf <elf_file>
Table 3 Parameters Parameter (Case Sensitive)
Mandatory/Optional
Description
--list-elf <elf_file>, -l
No
Obtains the list of device information files contained in the ELF file and prints the list.
<elf_file> indicates the path of the ELF file to be printed, for example, /home/op_api/lib_api.so.
|
Field |
Meaning |
Required |
Printing Description |
|---|---|---|---|
|
VERSION |
Version number. |
Yes |
If --verbose is not set, the file is printed by default. |
|
TYPE COUNT |
Number of kernel files contained in the ELF file. |
||
|
ELF FILE ${id} |
Name of a kernel file contained in the ELF file. ${id} indicates the sequence number of the kernel file. The kernel file naming rule is as follows: A kernel file name is in the format of ${sec_prefix}_${file_index}_${kernel_type}.o, where ${sec_prefix} indicates the section name (which is obtained by the tool based on the .ascend.kernel keyword), ${file_index} indicates the file number, and ${kernel_type} indicates the kernel type. |
||
|
KERNEL LEN |
Length of a kernel file. |
||
|
KERNEL TYPE |
Type of a kernel file. The mapping is {0: 'mix', 1: 'aiv', 2: 'aic'}. |
No |
|
|
ASCEND META |
Inter-core synchronization, ratio of Cube Cores to Vector Cores (task_ration), and other information during operator execution. If the information is not obtained, None is displayed by default. |
||
|
elf header infos |
Information such as the ELF header, section headers, key to flags, program headers, and symbol tables. |
No |
If --verbose is set, full information printing is enabled. |
|
Field |
Meaning |
Required |
Printing Description |
|---|---|---|---|
|
.ascend.meta. ${id} |
Kernel function name of an operator. ${id} indicates the index value of the meta information. |
Yes |
If --verbose is not set, the file is printed by default. |
|
VERSION |
Version number. |
Yes |
|
|
DEBUG |
Debugging information, including the following two parts:
|
No |
|
|
DYNAMIC_PARAM |
Indicates whether to enable dynamic parameters for the operator kernel function. The values are as follows:
|
||
|
OPTIONAL_PARAM |
Optional parameter information, including the following two parts:
|
||
|
KERNEL_TYPE |
Core type at the kernel function runtime. For details about the values, see Table 6. |
||
|
CROSS_CORE_SYNC |
Hardware synchronization (syncall) type.
|
||
|
MIX_TASK_RATION |
Indicates the allocation type of the Cube core/Vector core ratio during kernel function running. |
||
|
DETERMINISTIC_INFO |
Indicates whether the operator is a deterministic computation.
|
||
|
BLOCK_DIM |
Indicates the number of cores executed by the operator. This field is not supported currently. Only the default value 0xFFFFFFFF is printed. |
||
|
FUNCTION_ENTRY |
Indicates the value of the operator TilingKey. |
||
|
elf header infos |
Information such as the ELF header, section headers, key to flags, program headers, and symbol tables. |
No |
If --verbose is set, full information printing is enabled. |
|
KERNEL_TYPE |
Description |
|---|---|
|
AICORE |
This parameter is reserved and is not supported in the current version. Only the AI Cores are started during operator execution. For example, if blockdim is set to 5 on the host, 5 AI Cores are started. |
|
AIC |
Only the Cube Cores on the AI Cores are started during operator execution. For example, if blockdim is set to 10 on the host, 10 Cube Cores are started. |
|
AIV |
Only the Vector Cores on the AI Cores are started during operator execution. For example, if blockDim is set to 10 on the host, 10 Vector Cores are started. |
|
MIX_AIC_MAIN |
In the scenario of mixing AIC and AIV, if the kernel function type is set to MIX, the Cube and Vector Cores on the AI Cores are started at the same time during operator execution. For example, you can set blockdim to 10 and task_ration to 1:2 on the host. In this case, 10 Cube Cores and 20 Vector Cores are started. |
|
MIX_AIV_MAIN |
In the scenario of mixing AIC and AIV, when multi-core control instructions are used and the kernel function type is set to MIX, the Cube and Vector Cores on the AI Cores are started at the same time during operator execution. For example, you can set blockdim to 10 and task_ration to 1:2 on the host. In this case, 10 Vector Cores and 20 Cube Cores are started. |
|
AIC_ROLLBACK |
When the operator is executed, the AI Cores and Vector Cores are started at the same time. In this case, the AI Cores are used as the Cube Cores. |
|
AIV_ROLLBACK |
When the operator is executed, the AI Cores and Vector Cores are started at the same time. In this case, the AI Cores are used as the Vector Cores. |
Example (Kernel Launch Operator Project)
Take the MatMulInvocationNeo operator (NPU mode) an example. For details about the complete project, see matmul multi-core kernel launch sample. Assume that ${cmake_install_dir} is the root directory of the operator CMake compilation result. The directory structure is as follows (for reference only) and similar to Compiling the CMake Build Configuration File.
out ├── lib │ ├── libascendc_kernels_npu.so ├── include │ ├── ascendc_kernels_npu │ ├── aclrtlaunch_matmul_custom.h │ ├── aclrtlaunch_triple_chevrons_func.h ......
To parse and decompress the library files (such as *.so and *.a files) generated after compilation, run the following the commands:
- Parsing the library file containing device information
Two printing modes are supported. Select the one as required. For details about the parsed fields, see Table 4.
- Simple printing
msobjdump --dump-elf ${cmake_install_dir}/out/libascendc_kernels_npu.soAfter this command is executed, the basic device information is displayed on the device screen, as shown in the following:
1 2 3 4 5 6 7 8
=========================== [VERSION]: 1 [TYPE COUNT]: 1 =========================== [ELF FILE 0]: ascendxxxb1_ascendc_kernels_npu_0_mix.o [KERNEL TYPE]: mix [KERNEL LEN]: 511560 [ASCEND META]: None
- Full printing
msobjdump --dump-elf ${cmake_install_dir}/out/libascendc_kernels_npu.so --verboseAfter this command is executed, all device information is displayed on the device screen, as shown in the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
=========================== [VERSION]: 1 [TYPE COUNT]: 1 =========================== [ELF FILE 0]: ascendxxxb1_ascendc_kernels_npu_0_mix.o [KERNEL TYPE]: mix [KERNEL LEN]: 511560 [ASCEND META]: None ====== [elf heard infos] ====== ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: <unknown>: 0x1029 Version: 0x1 Entry point address: 0x0 Start of program headers: 64 (bytes into file) Start of section headers: 510280 (bytes into file) Flags: 0x940000 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 2 Size of section headers: 64 (bytes) Number of section headers: 20 Section header string table index: 18 Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 0000000000000000 0000b0 010a08 00 AX 0 0 4 ..................................................................................... [19] .strtab STRTAB 0000000000000000 071278 00b6cb 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), D (mbind), p (processor specific) There are no section groups in this file. Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x0000b0 0x0000000000000000 0x0000000000000000 0x010aa8 0x010aa8 R E 0x1000 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0 ......
- Simple printing
- Decompressing the library file that contains device information and flushing the file to the disk
msobjdump --extract-elf ${cmake_install_dir}/out/libascendc_kernels_npu.soAfter this command is executed, the ascendxxxb1_ascendc_kernels_npu_0_mix.o file is flushed to the disk in the current execution path by default.
- Obtaining the list of library files that contain device information
msobjdump --list-elf ${cmake_install_dir}/out/libascendc_kernels_npu.soAfter this command is executed, all files are displayed on the device screen, as shown in the following:
1ELF file 0: ascendxxxb1_ascendc_kernels_npu_0_mix.o
Usage Example (Standard/Simple Custom Operator Project)
Take the following operator project as an example (for reference only). Assume that ${cmake_install_dir} is the root directory of the operator CMake compilation result. The directory structure is similar to Operator Building.
├── op_api │ ├── include │ ├── aclnn_acos_custom.h │ ├── aclnn_matmul_leakyrelu_custom.h │ ├── ......... │ ├── lib │ ├── libcust_opapi.so
To parse and decompress the library files (such as *.so and *.a files) generated after compilation, run the following the commands:
- Parsing the library file containing device information
Two printing modes are supported. Select the one as required. For details about the parsed fields, see Table 5.
- Simple printing
msobjdump --dump-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.soAfter this command is executed, the basic device information is displayed on the device screen, as shown in the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
.ascend.meta META INFO VERSION: 1 DEBUG: debugBufSize=0, debugOptions=0 DYNAMIC_PARAM: dynamicParamMode=0 OPTIONAL_PARAM: optionalInputMode=1, optionalOutputMode=1 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_1 KERNEL_TYPE: AIV DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 1 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_2_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 2 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_3_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 3 .................................... .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_1 KERNEL_TYPE: AIV DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 1 .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_2_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 2 .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_3_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 3
- Full printing
msobjdump --dump-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.so --verboseAfter this command is executed, the basic device information is displayed on the device screen, as shown in the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
.ascend.meta META INFO VERSION: 1 DEBUG: debugBufSize=0, debugOptions=0 DYNAMIC_PARAM: dynamicParamMode=0 OPTIONAL_PARAM: optionalInputMode=1, optionalOutputMode=1 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_1 KERNEL_TYPE: AIV DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 1 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_2_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 2 .ascend.meta. [0]: AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26_3_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 3 .................................... .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_1 KERNEL_TYPE: AIV DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 1 .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_2_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 2 .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_3_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN DETERMINISTIC_INFO: 1 BLOCK_DIM: 0xFFFFFFFF FUNCTION_ENTRY: 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
.................................... ===== [elf heard infos] in ascendxxx_acos_custom_AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o =====: ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ................................................ Size of program headers: 56 (bytes) Number of program headers: 3 Size of section headers: 64 (bytes) Number of section headers: 9 Section header string table index: 7 Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 ..................................................................................... [ 8] .strtab STRTAB 0000000000000000 00529b 000119 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), D (mbind), p (processor specific) ................................................ ===== [elf heard infos] in ascendxxx_matmul_leakyrelu_custom_MatmulLeakyreluCustom_e052bee3255764ac919095f3bdf83389.o =====: ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) ................................................ Section header string table index: 6 Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 0000000000000000 0000e8 007ed8 00 AX 0 0 4 [ 2] .data PROGBITS 0000000000008000 0080e8 000008 00 WA 0 0 256 [ 3] .comment PROGBITS 0000000000000000 0080f0 000043 01 MS 0 0 1 [ 4] .bl_uninit NOBITS 0000000000000000 008133 000020 00 0 0 1 [ 5] .symtab SYMTAB 0000000000000000 008138 0000c0 18 7 1 8 [ 6] .shstrtab STRTAB 0000000000000000 0081f8 00003b 00 0 0 1 [ 7] .strtab STRTAB 0000000000000000 008233 0000ec 00 0 0 1 ................................................
- Simple printing
- Decompressing the library file that contains device information and flushing the file to the disk
msobjdump --extract-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.soAfter this command is executed, the decompressed file is saved in the current execution path by default. The result directory is as follows:
|-- config // Directory of the operator prototype configuration file | ├── ${soc_version} | ├── acos_custom.json | ├── matmul_leakyrelu_custom.json | ├── ....... |-- ${soc_version} // Ascend AI Processor name | ├── acos_custom // Basic single-operator compilation file (*.o) and the corresponding *.json file | ├── AcosCustom_da824ede53d7e754f85c14b9446ec2fc.json // Naming rules: ${op_type}_${parm_info}.json or ${op_type}_${parm_info}.o, where ${parm_info} is the identifier generated based on the operator input/output information such as the data type and shape. | ├── AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o | ├── AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.json | ├── AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.o | ├── matmul_leakyrelu_custom | ├── MatmulLeakyreluCustom_e052bee3255764ac919095f3bdf83389.json | ├── MatmulLeakyreluCustom_e052bee3255764ac919095f3bdf83389.o | ├── axpy_custom | ├── .....The following uses the decompression of the acos_custom operator compilation result as an example:
- View the operator prototype (acos_custom.json).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
{ "binList": [ { "implMode": "high_performance", "int64Mode": false, "simplifiedKeyMode": 0, "simplifiedKey": [......], "staticKey": "96b2b4bb2e3xxx,ee37ce8796ef139dexxxx", "inputs": [ { "name": "x", "index": 0, "dtype": "float32", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "outputs": [ { "name": "y", "index": 0, "dtype": "float32", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "attrs": [ { "name": "tmp", "dtype": "int", "value": 0 }, ......... ], "opMode": "dynamic", "optionalInputMode": "gen_placeholder", "deterministic": "ignore", "binInfo": { "jsonFilePath": "ascendxxx/acos_custom/AcosCustom_da824ede53d7e754f85c14b9446ec2fc.json" } }, { "implMode": "high_performance", "int64Mode": false, "simplifiedKeyMode": 0, "simplifiedKey": [ ], "staticKey": "27d6f997f2f3551axxxx,1385590c47affa578eb429xxx", "inputs": [ { "name": "x", "index": 0, "dtype": "float16", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "outputs": [ { "name": "y", "index": 0, "dtype": "float16", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "attrs": [ { "name": "tmp", "dtype": "int", "value": 0 }, ......... ], "opMode": "dynamic", "optionalInputMode": "gen_placeholder", "deterministic": "ignore", "binInfo": { "jsonFilePath": "ascendxxx/acos_custom/AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.json" } } ] }
- Parse the ${op_type}_${parm_info}.o file to obtain the .ascend.meta section information.
msobjdump --dump-elf ./AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o
After this command is executed, the device screen displays the following information, with the fields similar to those in the library file. For details, see Table 5.
1 2 3 4 5 6 7 8
.ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_1 KERNEL_TYPE: AIV .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_2_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1] .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_3_mix_aiv KERNEL_TYPE: MIX_AIV_MAIN MIX_TASK_RATION: [0:1]
- View ${op_type}_${parm_info}.json to obtain the operator information from the device file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
{ "binFileName": "AcosCustom_da824ede53d7e754f85c14b9446ec2fc", "binFileSuffix": ".o", "blockDim": -1, "coreType": "MIX", "intercoreSync": 1, "kernelName": "AcosCustom_da824ede53d7e754f85c14b9446ec2fc", "magic": "RT_DEV_BINARY_MAGIC_ELF", "memoryStamping": [], "opParaSize": 24, "parameters": [], "sha256": "94e32d04fcaf435411xxxxxxxx", "workspace": { "num": 1, "size": [ -1 ], "type": [ 0 ] }, "kernelList": [ { "tilingKey": 1, "kernelType": "MIX_AIC", "taskRation": "0:1", "crossCoreSync": 0, "kernelName": "AcosCustom_da824ede53d7e754f85c14b9446ec2fc_1" }, ......... ], "taskRation": "tilingKey", "optionalInputMode": "gen_placeholder", "debugOptions": "printf", "debugBufSize": 78643200, "compileInfo": {}, "supportInfo": { // Operator prototype information "implMode": "high_performance", "int64Mode": false, "simplifiedKeyMode": 0, "simplifiedKey": [......], "staticKey": "96b2b4bb2e35fa3dxxx,ee37ce8796ef139dedxxxxxxxx", "inputs": [ { "name": "x", "index": 0, "dtype": "float32", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "outputs": [ { "name": "y", "index": 0, "dtype": "float32", "format": "ND", "paramType": "required", "shape": [ -2 ], "format_match_mode": "FormatAgnostic" } ], "attrs": [ { "name": "tmp", "dtype": "int", "value": 0 }, ......... ], "opMode": "dynamic", "optionalInputMode": "gen_placeholder", "deterministic": "ignore" }, "filePath": "ascendxxx/acos_custom/AcosCustom_da824ede53d7e754f85c14b9446ec2fc.json" }
- View the operator prototype (acos_custom.json).
- Obtaining the list of library files that contain device information
msobjdump --list-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.soAfter this command is executed, all files are displayed on the device screen, as shown in the following:
1 2 3 4 5
ELF file 0: ascendxxx_acos_custom_AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.json ELF file 1: ascendxxx_acos_custom_AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.o .................... ELF file 2: ascendxxx_acos_custom_AcosCustom_da824ede53d7e754f85c14b9446ec2fc.json ELF file 3: ascendxxx_acos_custom_AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o