当前位置:网站首页>MindSpore:图算融合报错
MindSpore:图算融合报错
2022-08-04 09:03:00 【小乐快乐】
问题描述:
在mindspore1.1.1上做图算融合,硬件环境是Ascend 910,程序没有问题,添加运行图算融合(enable_graph_kernel=True)参数之后程序报错:
ms.context.set_context(mode=ms.context.GRAPH_MODE, device_target=args.device_target,
save_graphs=False, max_call_depth=10000, device_id=args.device_id, enable_graph_kernel=True)
报错记录如下:
Traceback (most recent call last):
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 35, in <module>
run_compiler(sys.argv[1])
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 28, in run_compiler
p = __import__("akg", globals(), locals(), ['ms'], 0)
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/__init__.py", line 84, in <module>
from . import autodiff
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/autodiff.py", line 19, in <module>
from akg.tvm._ffi.function import _init_api
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/__init__.py", line 62, in load_module
__import__(self.__rname, globals(), locals())
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/__init__.py", line 27, in <module>
from . import tensor
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/tensor.py", line 20, in <module>
from ._ffi.node import NodeBase, NodeGeneric, register_node, convert_to_node
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/_ffi/node.py", line 24, in <module>
from .object import Object, register_object, _set_class_node
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/_ffi/object.py", line 23, in <module>
from .base import _FFI_MODE, _RUNTIME_ONLY, check_call, _LIB, c_str
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/_ffi/base.py", line 81, in <module>
_LIB, _LIB_NAME = _load_lib()
File "/opt/python3.7.5/lib/python3.7/site-packages/akg/tvm/_ffi/base.py", line 73, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/opt/python3.7.5/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /opt/python3.7.5/lib/python3.7/site-packages/mindspore/lib/libakg.so: undefined symbol: pthread_atfork
Traceback (most recent call last):
Traceback (most recent call last):
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 35, in <module>
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 35, in <module>
run_compiler(sys.argv[1])
run_compiler(sys.argv[1])
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 28, in run_compiler
File "/opt/python3.7.5/lib/python3.7/site-packages/mindspore/_extends/parallel_compile/akg_compiler/compiler.py", line 28, in run_compiler
p = __import__("akg", globals(), locals(), ['ms'], 0)
p = __import__("akg", globals(), locals(), ['ms'], 0)
这个报错记录太长了,超过帖子最大字数限制,我把报错记录放在附件error.txt中了
求问有哪位大神指导这个问题如何解决吗?
解决方案:
这个问题的原因在于使用了高版本的gcc编译akg时找不到pthread_atfork。
pthread_atfork是POSIX标准,在编译时要加上-pthread
-lpthread是老版本的gcc编译器用的,在新版本中应该用-pthread取代-lpthread
可以在akg 的 cmakelist下的target_link_libraries增加pthread重新编译一次
边栏推荐
- binder通信实现
- About Oracle RAC 11g rebuilding the disk group
- 反序列化漏洞
- 【Attention】Dual Attention(DANet) & Fully Attention(FLA)
- VRRP+MSTP配置详解【华为eNSP实验】
- 【论文笔记】Delving into the Estimation Shift of Batch Normalization in a Network
- B站回应HR称“核心用户都是Loser”、求职者是“白嫖党”:已被劝退
- sync-diff-inspector 使用实践
- tcp连接的细节
- Shared_preload_libraries导致很多语法不支持
猜你喜欢
Anton Paar安东帕密度计比重计维修DMA35性能参数
Interview at 14:00 in the afternoon, I came out at 14:08 with my head down, asking too much...
2022年制冷与空调设备运行操作特种作业证考试题库及模拟考试
路由/三层交换机DHCP下发地址详解【华为eNSP】
Apache Druid 实时分析数据库入门介绍
BFM模型和Landmarks可视化
Yolov5 replaces the backbone network of "Megvii Lightweight Convolutional Neural Network ShuffleNetv2"
【正点原子STM32连载】第一章 本书学习方法 摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
spark算子讲解
2022年化工自动化控制仪表考试模拟100题及模拟考试
随机推荐
How to import data from PG to kingbaseES
【论文笔记】Dynamic Convolution: Attention over Convolution Kernels
路由/三层交换机DHCP下发地址详解【华为eNSP】
JSP基本语法
Libpq 是否支持读写分离配置
async - await
sql在字段重复时 对某个字段根据最新时间取数
他97年的,我既然卷不过他...
VRRP+MSTP配置详解【华为eNSP实验】
【Attention】Dual Attention(DANet) & Fully Attention(FLA)
binder通信实现
TiCDC同步延迟问题处理
js - the first letter that appears twice
速速脱单诀窍
区分惯性环节与延迟环节
VRRP + MSTP configuration, huawei eNSP experiment 】 【
leetcode每天5题-Day06
关于#sql#的问题:后面换了一个数据库里面的数据就不能跑了
预测性维护学习之路
学会 Arthas,让你 3 年经验掌握 5 年功力