PyTorch torch.compiled_with_cxx11_abi 函数
torch.compiled_with_cxx11_abi 是 PyTorch 中用于检查编译选项的函数。返回 PyTorch 是否使用 C++11 ABI 编译。
函数定义
torch.compiled_with_cxx11_abi()
使用示例
实例
import torch
# 检查 PyTorch 编译选项
is_cxx11 = torch.compiled_with_cxx11_abi()
print(f"Compiled with C++11 ABI: {is_cxx11}")
# 检查 PyTorch 编译选项
is_cxx11 = torch.compiled_with_cxx11_abi()
print(f"Compiled with C++11 ABI: {is_cxx11}")

Pytorch torch 参考手册