昇腾社区首页
中文
注册

msobjdump工具

本工具主要针对Kernel直调工程(NPU模式)、简易自定义算子工程编译生成的算子ELF文件(Executable and Linkable Format)提供解析和解压功能,并将结果信息以可读形式呈现,方便开发者直观获得kernel文件信息。

使用工具过程中,注意事项如下:

  • 当ELF文件未找到或权限错误:终端会打印提示信息,请根据提示排查问题。
  • 当ELF存在但不支持解析或解压:终端不会打印任何device信息。

ELF文件是一种用于二进制文件、可执行文件、目标代码、共享库和核心转储的文件格式,包括常见的*.a、*.so文件等。ELF文件构成如下:

  • ELF头部:描述了整个文件的组织结构,包括文件类型、机器类型、版本号等信息。
  • 程序头部表:描述了文件中各种段(segments)信息,包括程序如何加载到内存中执行的信息。
  • 节区头部表:描述了文件中各个节(sections)信息,包括程序的代码、数据、符号表等。

ELF文件主要用于Linux和其他类Unix操作系统中,用于程序的执行和链接。

工具安装

  1. 安装msobjdump工具。

    工具跟随CANN软件包发布(参考环境准备完成CANN安装),其路径默认为“${INSTALL_DIR}/tools/msobjdump”,其中${INSTALL_DIR}请替换为CANN软件安装后文件存储路径。若安装的Ascend-cann-toolkit软件包,以root安装举例,则安装后文件存储路径为:/usr/local/Ascend/ascend-toolkit/latest。

  2. 设置环境变量。
    • root用户安装Ascend-cann-toolkit包时
      source /usr/local/Ascend/ascend-toolkit/set_env.sh
      source /usr/local/Ascend/ascend-toolkit/latest/toolkit/bin/setenv.bash
    • 非root用户安装Ascend-cann-toolkit包时
      source ${HOME}/Ascend/ascend-toolkit/set_env.sh
      source ${HOME}/Ascend/ascend-toolkit/latest/toolkit/bin/setenv.bash
  3. 检查工具是否安装成功。
    执行如下命令,若能正常显示--help或-h信息,则表示工具环境正常,功能可正常使用。
    msobjdump -h

功能介绍

工具关键功能说明如下,全量的命令参数说明参见表1

  • 解析ELF文件

    解析ELF文件内部device信息,如文件长度、 文件类型、每个文件的段信息、符号表信息等,命令样式如下:

    msobjdump --dump-elf ${elf_file} [--verbose]
    • --dump-elf:必选,${elf_file}为待解析ELF文件路径,如/home/op_api/lib_api.so。
    • --verbose:[ ]表示可选,目前仅适用于Kernel直调工程。设置后,终端可打屏显示device所有字段信息,如表2所示;不设置时,终端仅打屏显示VERSION、TYPE COUNT、ELF FILE ${id}、KERNEL TYPE、KERNEL LEN、ASCEND META信息。
  • 解压ELF文件

    解压ELF文件并落盘到指定目录,命令样式如下:

    msobjdump --extract-elf ${elf_file} [--out-dir ${out_path}]
    • --extract-elf:必选,{elf_file}为待解压ELF文件路径,如/home/op_api/lib_api.so
    • --out-dir:[ ]表示可选,${out_path}为落盘文件目录,如/home/extract/。若不设置--out-dir,工具默认将解压文件落盘到当前执行路径下。
  • 获取ELF文件列表

    终端打印所有device信息文件列表,命令样式如下:

    msobjdump --list-elf ${elf_file}

    --list-elf :必选字段,${elf_file}为待打印的ELF文件路径,如/home/op_api/lib_api.so。

表1 msobjdump参数说明

功能参数

(区分大小写)

功能说明

是否必选

-d,--dump-elf

解析ELF文件中包含的device信息,如文件名、文件类型、文件长度等(具体参见表2),并终端打屏显示。

  • 非Kernel直调工程场景下:默认打屏显示全量的device信息
  • Kernel直调工程场景下:默认打屏显示VERSION、TYPE COUNT、ELF FILE ${id}、KERNEL TYPE、KERNEL LEN、ASCEND META字段信息。可与--verbose配套使用,开启全量device信息打屏显示功能。

三选一,必选

-e,--extract-elf

解压ELF文件中包含的device信息,并按原始文件夹规则落盘到输出路径下。

  • 默认路径:解压结果文件落盘到当前执行路径下。
  • 自定义路径:可与--out-dir配套使用,设置落盘路径。

-l,--list-elf

打屏显示输ELF文件中包含的device信息文件列表。

-V, --verbose

必须与--dump-elf配套使用,用于开启ELF文件中全量device信息打屏显示功能。

可选

-o,--out-dir

必须与--extract-elf配套使用,用于设置解压文件的落盘路径。

说明:

msobjdump支持多用户并发调用,但需要指定不同的--out-dir,否则可能出现落盘内容被覆盖的问题。

表2 ELF解析字段说明

关键字段

说明

是否必选

VERSION

版本号。

TYPE COUNT

当前算子二进制包中包含的kernel文件个数。

ELF FILE ${id}

罗列的kernel文件,文件名是按照${sec_prefix}_${file_index}_${kernel_type}.o拼接而成,其中${sec_prefix}为section段名(工具根据“.ascend.kernel”关键字搜索获取),${file_index}表示文件编号,${kernel_type}表示kernel类型。

KERNEL TYPE

当前kernel文件的类型,映射关系为{0 : 'mix', 1: 'aiv', 2: 'aic'}。

KERNEL LEN

当前kernel文件的长度。

ASCEND META

示算子执行时核间同步、Cube/Vector核占比(task_ration)等信息。若没有获取到该信息,默认显示None。

elf heard infos

包括ELF Header、Section Headers、Key to Flags、Program Headers、Symbol表等信息。

使用样例(Kernel直调算子工程)

以MatMulInvocationNeo算子为例(NPU模式),完整的工程可参考Matmul多核Kernel直调样例。假设${cmake_install_dir}为算子Cmake编译产物根目录,目录结构如下(仅为示例,具体以实际算子工程为准),类似CMake编译配置文件编写

out
├── lib 
│   ├── libascendc_kernels_npu.so
├── include
│   ├── ascendc_kernels_npu
│           ├── aclrtlaunch_matmul_custom.h
│           ├── aclrtlaunch_triple_chevrons_func.h
.....

工具对编译生成的库文件(如*.so、*.a等)进行解析和解压,功能实现命令样例如下:

  • 解析包含device信息的库文件
    • 简单打屏显示
      msobjdump --dump-elf ${cmake_install_dir}/out/libascendc_kernels_npu.so

      执行命令后,终端打印基础device信息,示例如下,字段含义参见表2

      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
      
    • 全量打屏显示
      msobjdump --dump-elf ${cmake_install_dir}/out/libascendc_kernels_npu.so --verbose

      执行命令后,终端打印所有device信息,示例如下,字段含义参见表2

       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
      ......
      
  • 解压包含device信息的库文件并落盘
    msobjdump --extract-elf ${cmake_install_dir}/out/libascendc_kernels_npu.so

    执行命令后,默认在当前执行路径下落盘ascendxxxb1_ascendc_kernels_npu_0_mix.o文件。

  • 获取包含device信息的库文件列表
    msobjdump --list-elf ${cmake_install_dir}/out/libascendc_kernels_npu.so

    执行命令后,终端会打印所有文件,屏显样例如下:

    1
    ELF file    0: ascendxxxb1_ascendc_kernels_npu_0_mix.o
    

使用样例(简易自定义算子工程)

以下面的算子工程为例(仅为示例,具体以实际算子工程为准),假设${cmake_install_dir}为算子Cmake编译产物根目录,目录结构如下,类似算子工程编译

├── op_api
│   ├── include
│       ├── aclnn_acos_custom.h
│       ├── aclnn_matmul_leakyrelu_custom.h
│       ├── .........
│   ├── lib
│       ├── libcust_opapi.so

工具对编译生成的库文件(如*.so、*.a等)进行解析和解压,功能实现命令样例如下:

  • 解析包含device信息的库文件
    msobjdump --dump-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.so 

    执行命令后,终端会打印每个算子device信息section段、符号表信息,示例如下,字段含义参见表2

     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
    ===== [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
    ..................................
    
  • 解压包含device信息的库文件并落盘
    msobjdump --extract-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.so 

    执行命令后,默认在当前执行路径下保存解压文件,产物目录如下:

    |-- config                                                               // 算子原型配置文件目录
    |    ├── ${soc_version}   
    |        ├── acos_custom.json                                  
    |        ├── matmul_leakyrelu_custom.json                               
    |        ├── .......                                             
    |-- ${soc_version}                                                     // 昇腾AI处理器名
    |     ├── acos_custom                                               // 基础单算子编译文件*.o和对应的*.json文件
    |         ├── AcosCustom_da824ede53d7e754f85c14b9446ec2fc.json      // 命名规则:${op_type}_${parm_info}.json或${op_type}_${parm_info}.o,${parm_info}是基于算子输入/输出dtype、shape等信息生成的标识码
    |         ├── AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o
    |         ├── AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.json
    |         ├── AcosCustom_dad9c8ca8fcbfd789010c8b1c0da8e26.o
    |     ├── matmul_leakyrelu_custom  
    |         ├── MatmulLeakyreluCustom_e052bee3255764ac919095f3bdf83389.json
    |         ├── MatmulLeakyreluCustom_e052bee3255764ac919095f3bdf83389.o
    |     ├── axpy_custom    
    |         ├── .....

    以acos_custom算子编译产物解压为例:

    • 查看算子原型(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"
                  }
              }
          ]
      }
      
    • 解析${op_type}_${parm_info}.o获取.ascend.meta section段信息。
      msobjdump --dump-elf ./AcosCustom_da824ede53d7e754f85c14b9446ec2fc.o

      执行命令后,终端屏显信息如下,参数说明参见表3表4表5

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_1
      T: 1  L: 4  V: 3
      F_TYPE_KTYPE: K_TYPE_AIV
      .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_2_mix_aiv
      T: 1  L: 4  V: 5
      F_TYPE_KTYPE: K_TYPE_MIX_AIV_MAIN
      T: 3  L: 4  V: [0:1]
      F_TYPE_MIX_TASK_RATION: [0:1]
      .ascend.meta. [0]: AcosCustom_da824ede53d7e754f85c14b9446ec2fc_3_mix_aiv
      T: 1  L: 4  V: 5
      F_TYPE_KTYPE: K_TYPE_MIX_AIV_MAIN
      T: 3  L: 4  V: [0:1]
      F_TYPE_MIX_TASK_RATION: [0:1]
      
      表3 类型映射关系

      解析类型

      解析类型映射

      说明

      1

      F_TYPE_KTYPE

      表示kernel type。

      2

      F_TYPE_CROSS_CORE_SYNC

      表示硬同步syncall类型。

      3

      F_TYPE_MIX_TASK_RATION

      表示核函数运行时的core分配类型。

      表4 kernel type映射关系

      kernel type数值

      对应的kernel type

      说明

      1

      K_TYPE_AICORE

      该参数为预留参数,当前版本暂不支持。

      算子执行时仅会启动AI Core,比如用户在host侧设置blockdim为5,则会启动5个AI Core。

      2

      K_TYPE_AIC

      算子执行时仅启动AI Core上的Cube核:比如用户在host侧设置blockdim为10,则会启动10个Cube核。

      3

      K_TYPE_AIV

      算子执行时仅启动AI Core上的Vecor核:比如用户在host侧设置blockdim为10,则会启动10个Vecor核。

      4

      K_TYPE_MIX_AIC_MAIN

      AIC、AIV混合场景下,设置核函数的类型为MIX ,算子执行时会同时启动AI Core上的Cube核和Vector核,比如用户在host侧设置blockdim为10,且设置task_ration为1:2,则会启动10个Cube核和20个Vector核。

      5

      K_TYPE_MIX_AIV_MAIN

      AIC、AIV混合场景下,使用了多核控制相关指令时,设置核函数的类型为MIX,算子执行时会同时启动AI Core上的Cube核和Vector核,比如用户在host侧设置blockdim为10,且设置task_ration为1:2,则会启动10个Vector核和20个Cube核。

      6

      K_TYPE_AIC_ROLLBACK

      算子执行时会同时启动AI Core和Vector Core, 此时AI Core会当成Cube Core使用。

      7

      K_TYPE_AIV_ROLLBACK

      算子执行时会同时启动AI Core和Vector Core, 此时AI Core会当成Vector Core使用。

      表5 硬同步映射关系

      硬同步数值

      对应的硬同步类型

      说明

      1

      C_TYPE_USE_SYNC

      使用硬同步。

      0

      C_TYPE_NO_USE_SYNC

      不使用硬同步。

    • 查看${op_type}_${parm_info}.json,直观获取device文件中算子信息。
       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": {                                                        // 算子原型信息
              "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"
      }
      
  • 获取包含device信息的库文件列表
    msobjdump --list-elf ${cmake_install_dir}/op_api/lib/libcust_opapi.so 

    执行命令后,终端会打印所有文件,屏显样例如下:

    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