From 76023c343803f4bdd925e0fa3c709a47ed12d618 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 1 Sep 2022 19:03:23 +0800 Subject: [PATCH] add deps on mkldnn for fluid_convert_util (#45633) * clean includes of convert_util, test=kunlun * add deps on mkldnn, test=kunlun --- paddle/fluid/framework/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index fc20b61f36a..c9b6213cf68 100755 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -1208,6 +1208,13 @@ else() SRCS convert_utils.cc DEPS data_type place) endif() + +# every source file that includes "dnnl.h" must depends on mkldnn +# or, the first one should depends on mkldnn +if(WITH_MKLDNN) + add_dependencies(fluid_convert_utils mkldnn) +endif() + cc_test( convert_utils_test SRCS convert_utils_test.cc -- GitLab