【MKL】2014MKL下使用layers.matmul,输入3D shape会报段错误
Created by: Aurelius84
使用2014版本的libmklml_intel.so
编译develop分支的whl包,在输入为3D shape时,调用layers.matmul
会出现Segmentation fault
Note: 目前paddle-dev是没有问题的,只是替换mkl为2014的,会出错。
1. 复现环境
- Python版本:
2.7.15
- 操作系统:CentOS release 6.3 (Final)
2. 复现代码
import paddle.fluid as fluid
import numpy as np
shape = [11, 84, 12]
x = fluid.data(shape=shape, dtype='float32', name='x')
y = fluid.data(shape=shape, dtype='float32', name='y')
z = fluid.layers.matmul(x, y, transpose_y=True)
x_data = np.random.random(shape).astype('float32')
y_data = np.random.random(shape).astype('float32')
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(fluid.default_startup_program())
res = exe.run(feed = {'x': x_data, 'y':y_data}, fetch_list=[z])
错误日志:
/workspace/baidu/personal-code/test_matmul/env2014/lib/python2.7/site-packages/paddle/fluid/executor.py:784: UserWarning: The current program is empty.
warnings.warn(error_info)
W1128 08:57:38.760659 182155 init.cc:205] *** Aborted at 1574931458 (unix time) try "date -d @1574931458" if you are using GNU date ***
W1128 08:57:38.761991 182155 init.cc:205] PC: @ 0x0 (unknown)
W1128 08:57:38.762099 182155 init.cc:205] *** SIGSEGV (@0x0) received by PID 182155 (TID 0x7fc6fcda5700) from PID 0; stack trace: ***
W1128 08:57:38.763234 182155 init.cc:205] @ 0x7fc6fc5777e0 (unknown)
W1128 08:57:38.764281 182155 init.cc:205] @ 0x0 (unknown)
Segmentation fault