From e15e4ed0122a266c62e0d3a4d2b6daf7dec28163 Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Mon, 7 Feb 2022 14:12:03 +0800 Subject: [PATCH] Enabled final state Eager Dygraph Codegen (#39355) --- .../api/generated/eager_generated/backwards/CMakeLists.txt | 7 +++++-- .../api/generated/eager_generated/forwards/CMakeLists.txt | 7 +++++-- paddle/fluid/eager/auto_code_generator/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/eager/api/generated/eager_generated/backwards/CMakeLists.txt b/paddle/fluid/eager/api/generated/eager_generated/backwards/CMakeLists.txt index e04d282748c..e3fafb265ad 100644 --- a/paddle/fluid/eager/api/generated/eager_generated/backwards/CMakeLists.txt +++ b/paddle/fluid/eager/api/generated/eager_generated/backwards/CMakeLists.txt @@ -1,3 +1,6 @@ cc_library(scale_node SRCS scale_node.cc DEPS global_utils pten pten_api grad_node_info) -#cc_library(final_dygraph_node SRCS nodes.cc DEPS ${eager_deps}) -#add_dependencies(final_dygraph_node eager_final_state_codegen) + +if(NOT ON_INFER) +cc_library(final_dygraph_node SRCS nodes.cc DEPS ${eager_deps}) +add_dependencies(final_dygraph_node eager_final_state_codegen) +endif() diff --git a/paddle/fluid/eager/api/generated/eager_generated/forwards/CMakeLists.txt b/paddle/fluid/eager/api/generated/eager_generated/forwards/CMakeLists.txt index f682c27992d..8ede139ddc0 100644 --- a/paddle/fluid/eager/api/generated/eager_generated/forwards/CMakeLists.txt +++ b/paddle/fluid/eager/api/generated/eager_generated/forwards/CMakeLists.txt @@ -1,3 +1,6 @@ cc_library(eager_scale SRCS scale.cc DEPS pten_api pten autograd_meta scale_node) -#cc_library(final_dygraph_function SRCS dygraph_functions.cc DEPS ${eager_deps}) -#add_dependencies(final_dygraph_function eager_final_state_codegen) + +if(NOT ON_INFER) +cc_library(final_dygraph_function SRCS dygraph_functions.cc DEPS ${eager_deps}) +add_dependencies(final_dygraph_function eager_final_state_codegen) +endif() diff --git a/paddle/fluid/eager/auto_code_generator/CMakeLists.txt b/paddle/fluid/eager/auto_code_generator/CMakeLists.txt index c504a126dde..668e60d857b 100644 --- a/paddle/fluid/eager/auto_code_generator/CMakeLists.txt +++ b/paddle/fluid/eager/auto_code_generator/CMakeLists.txt @@ -1,4 +1,4 @@ -#add_subdirectory(final_state_generator) +add_subdirectory(final_state_generator) set(EAGER_GENERETOR_DEPS ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS} pybind proto_desc executor layer tracer engine imperative_profiler imperative_flag) -- GitLab