网站设计原则有哪些,最火爆的视频制作app,飞沐网站建设,python是什么目录 2024/1/19日更新确定已安装G编译测试程序获取宏值安装对应的Transformer LLM推理模型库和Transformer推理加速库小结 2024/1/19日更新
具体使用cxx11abi0 还是cxx11abi1 可通过python命令查询
import torch
torch.compiled_with_cxx11_abi()若返回True 则使用 cxx11abi1… 目录 2024/1/19日更新确定已安装G编译测试程序获取宏值安装对应的Transformer LLM推理模型库和Transformer推理加速库小结 2024/1/19日更新
具体使用cxx11abi0 还是cxx11abi1 可通过python命令查询
import torch
torch.compiled_with_cxx11_abi()若返回True 则使用 cxx11abi1否则相反。
确定已安装G
命令行输入
g -v示例输出
Using built-in specs.
COLLECT_GCCg
COLLECT_LTO_WRAPPER/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix/usr --mandir/usr/share/man --infodir/usr/share/info --enable-shared --enable-threadsposix --enable-checkingrelease --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-stylegnu --enable-languagesc,c,objc,obj-c,fortran,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --buildaarch64-linux-gnu --with-stage1-ldflags -Wl,-z,relro,-z,now --with-boot-ldflags -Wl,-z,relro,-z,now --disable-bootstrap --with-multilib-listlp64 --enable-bolt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 (GCC)总结网络上的搜索结果如果GCC版本大于5.1那么_GLIBCXX_USE_CXX11_ABI参数都是1 如果要编译低版本的软件_GLIBCXX_USE_CXX11_ABI参数需要设置为0
编译测试程序获取宏值
新建一个文件
vim test.cpp将下面的代码复制进去wq保存
#include iostream
using namespace std;int main() {#ifdef _GLIBCXX_USE_CXX11_ABIcout _GLIBCXX_USE_CXX11_ABI endl; #elsecout not defined endl;#endif
}使用g进行编译
g -o test test.cpp运行可执行文件
./test这将会打印输出_GLIBCXX_USE_CXX11_ABI参数的值
安装对应的Transformer LLM推理模型库和Transformer推理加速库
示例版本 Ascend-cann-llm_7.0.0_linux-aarch64_torch2.0.1-abi0.tar.gz Ascend-cann-atb_7.0.0_linux-aarch64_abi0.run
小结
按照官方的方式得到_GLIBCXX_USE_CXX11_ABI参数的值是0 按照编译测试程序获取宏值的方式得到的参数值是1 不敢还是按照官方的来吧选择0