From c42619d07ecbf16c63730768742df8627da05669 Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Tue, 20 Sep 2022 09:52:21 +0800 Subject: [PATCH] delete cmake saved tensor hooks on infer (#46215) --- paddle/fluid/eager/CMakeLists.txt | 8 ++++---- paddle/fluid/pybind/CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/eager/CMakeLists.txt b/paddle/fluid/eager/CMakeLists.txt index 7d99a80eae..bd005fc41d 100644 --- a/paddle/fluid/eager/CMakeLists.txt +++ b/paddle/fluid/eager/CMakeLists.txt @@ -78,10 +78,10 @@ cc_library( autograd_meta hook_utils) -cc_library( - saved_tensors_hooks - SRCS saved_tensors_hooks.cc - DEPS hook_utils) if(NOT ((NOT WITH_PYTHON) AND ON_INFER)) + cc_library( + saved_tensors_hooks + SRCS saved_tensors_hooks.cc + DEPS hook_utils) add_subdirectory(tests) endif() diff --git a/paddle/fluid/pybind/CMakeLists.txt b/paddle/fluid/pybind/CMakeLists.txt index a1231d7f55..7e5bf07ea3 100755 --- a/paddle/fluid/pybind/CMakeLists.txt +++ b/paddle/fluid/pybind/CMakeLists.txt @@ -41,8 +41,7 @@ set(PYBIND_DEPS new_profiler auto_parallel jit_layer - jit_property - saved_tensors_hooks) + jit_property) if(WITH_PSCORE) set(PYBIND_DEPS ${PYBIND_DEPS} ps_service) @@ -571,6 +570,7 @@ if(WITH_PYTHON) list(APPEND PYBIND_DEPS python) list(APPEND PYBIND_DEPS custom_operator) list(APPEND PYBIND_DEPS custom_operator_node) + list(APPEND PYBIND_DEPS saved_tensors_hooks) endif() cc_library( -- GitLab