From af95a8b4252ab9eabcf2914a868ee353ec293007 Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Mon, 20 Mar 2023 10:11:27 +0800 Subject: [PATCH] refine eager code gen (#51746) --- .../eager/auto_code_generator/generate_file_structures.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/eager/auto_code_generator/generate_file_structures.py b/paddle/fluid/eager/auto_code_generator/generate_file_structures.py index 3de8e587eea..1feb5d80c88 100644 --- a/paddle/fluid/eager/auto_code_generator/generate_file_structures.py +++ b/paddle/fluid/eager/auto_code_generator/generate_file_structures.py @@ -143,7 +143,9 @@ def GenerateFileStructureForIntermediateDygraph(eager_dir, split_count): for i in range(split_count): f.write("nodes" + str(i + 1) + ".cc ") f.write("${fluid_manual_nodes} DEPS ${eager_deps} ${fluid_deps})\n") - f.write("add_dependencies(dygraph_node copy_dygraph_node)\n") + f.write( + "add_dependencies(dygraph_node copy_dygraph_node copy_dygraph_forward_functions)\n" + ) with open(forwards_level_cmakelist_path, "w") as f: f.write("add_custom_target(\n") @@ -181,7 +183,7 @@ def GenerateFileStructureForIntermediateDygraph(eager_dir, split_count): "${fluid_manual_functions} DEPS ${eager_deps} ${fluid_deps} ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS})\n" ) f.write( - "add_dependencies(dygraph_function copy_dygraph_forward_functions)\n" + "add_dependencies(dygraph_function copy_dygraph_forward_functions copy_dygraph_node)\n" ) with open(generated_level_cmakelist_path, "w") as f: -- GitLab