Compilation failed on blas due to mkldnn
Created by: tonyyang-svail
Message:
[15:53:08]W: [Step 1/1] In file included from /paddle/paddle/fluid/framework/tensor.h:26:0,
[15:53:08]W: [Step 1/1] from /paddle/paddle/fluid/framework/mixed_vector.h:21,
[15:53:08]W: [Step 1/1] from /paddle/paddle/fluid/framework/lod_tensor.h:28,
[15:53:08]W: [Step 1/1] from /paddle/paddle/fluid/framework/operator.h:28,
[15:53:08]W: [Step 1/1] from /paddle/paddle/fluid/operators/math/blas.h:17,
[15:53:08]W: [Step 1/1] from /paddle/paddle/fluid/operators/math/blas.cc:15:
[15:53:08]W: [Step 1/1] /paddle/paddle/fluid/platform/device_context.h:26:22: fatal error: mkldnn.hpp: No such file or directory
[15:53:08]W: [Step 1/1] compilation terminated.
Failed to compile blas.cc
due to mkldnn.hpp
not found.
However, we have
-
blas
depends ondevice_context
https://github.com/PaddlePaddle/Paddle/blob/219a55cd1c13e6fce43d1f23ba3b80a07d86438f/paddle/fluid/operators/math/CMakeLists.txt#L44 -
device_context
depends onmkldnn
https://github.com/PaddlePaddle/Paddle/blob/219a55cd1c13e6fce43d1f23ba3b80a07d86438f/paddle/fluid/platform/CMakeLists.txt#L45-L46 -
mkldnn
should have providedmkldnn.hpp
https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/mkldnn.cmake
So blas.cc should be able to find mkldnn.hpp
...