运行环境为aarch64而开发环境为x86_64的场景:
1:安装Ascend-cann-toolkit_8.0.RC2.alpha002_linux-x86_64.run 软件包。
2:编译官方提供的标准sample:
samples/operator/AddCustomSample/FrameworkLaunch/AclNNInvocation
会有报错:
ascend-toolkit/7.0.0/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: cannot find -lacl_op_compiler: No such file or directory
collect2: error: ld returned 1 exit status
Cmake脚本确实会引用acl_op_compiler库:

3:安装包下面,是有对应so 的:

4:通过readelf -h 查看所有so, 架构均为X86:
readelf -h ./8.0.RC2.alpha002/atc/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./8.0.RC2.alpha002/fwkacllib/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./8.0.RC2.alpha002/x86_64-linux/devlib/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
readelf -h ./8.0.RC2.alpha002/compiler/lib64/stub/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
readelf -h ./8.0.RC2.alpha002/compiler/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./latest/x86_64-linux/devlib/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
所以,是不是libacl_op_compiler .so 这个库漏发布了?其它aarch64 的so在Ascend8.0RC1.alpha003/ascend-toolkit/8.0.RC2.alpha002/x86_64-linux/devlib/aarch64/是可以找到的。
运行环境为aarch64而开发环境为x86_64的场景:
1:安装Ascend-cann-toolkit_8.0.RC2.alpha002_linux-x86_64.run 软件包。
2:编译官方提供的标准sample:
samples/operator/AddCustomSample/FrameworkLaunch/AclNNInvocation
会有报错:
ascend-toolkit/7.0.0/toolkit/toolchain/hcc/bin/../lib64/gcc/aarch64-target-linux-gnu/7.3.0/../../../../aarch64-target-linux-gnu/bin/ld: cannot find -lacl_op_compiler: No such file or directory
collect2: error: ld returned 1 exit status
Cmake脚本确实会引用acl_op_compiler库:
3:安装包下面,是有对应so 的:
4:通过readelf -h 查看所有so, 架构均为X86:
readelf -h ./8.0.RC2.alpha002/atc/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./8.0.RC2.alpha002/fwkacllib/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./8.0.RC2.alpha002/x86_64-linux/devlib/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
readelf -h ./8.0.RC2.alpha002/compiler/lib64/stub/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
readelf -h ./8.0.RC2.alpha002/compiler/lib64/libacl_op_compiler.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x8d80
Start of program headers: 64 (bytes into file)
Start of section headers: 355912 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf -h ./latest/x86_64-linux/devlib/libacl_op_compiler.so
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: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1050
Start of program headers: 64 (bytes into file)
Start of section headers: 20680 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
所以,是不是libacl_op_compiler .so 这个库漏发布了?其它aarch64 的so在Ascend8.0RC1.alpha003/ascend-toolkit/8.0.RC2.alpha002/x86_64-linux/devlib/aarch64/是可以找到的。