From af30f54559682016b5d39445c264f572ebbdddd9 Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Thu, 16 Dec 2021 17:28:25 +0800 Subject: [PATCH] Fixed LD_LIBRARY_PATH for eager_code_generator (#38160) * Rearranged Eager AutoCodeGen directory structure * Removed USE_OP in Eager AutoCodeGen * Enabled generation for Operators without Grad/Inputs/Outputs * Resolved operators without input * Fixed merge conflicts * Enabled Eager AutoCodeGen for 10+ more operators * Refactored Eager AutoCodeGen with more organized helper objects * Enabled Eager AutoCodeGen for operators with multiple OpBases * Adjusted Eager AutoCodeGen to Enable Passing Output Tensor as Input Argument * Handled Dispensable Inputs/Outputs in Eager AutoCodeGen * Enabled Eager AutoCodeGen for All Existing Operators & Possible Future Operators * Fixed CI issues * Fixed LD_LIBRARY_PATH for eager_code_generator --- paddle/fluid/eager/auto_code_generator/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/eager/auto_code_generator/CMakeLists.txt b/paddle/fluid/eager/auto_code_generator/CMakeLists.txt index b7db15f9dd4..d8f1e32ff01 100644 --- a/paddle/fluid/eager/auto_code_generator/CMakeLists.txt +++ b/paddle/fluid/eager/auto_code_generator/CMakeLists.txt @@ -52,7 +52,9 @@ if(WIN32) VERBATIM) else() add_custom_target(eager_codegen - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/eager_generator" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated" + COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_CURRENT_BINARY_DIR}/../../pybind" + "${CMAKE_CURRENT_BINARY_DIR}/eager_generator" + "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated" DEPENDS eager_generator VERBATIM) endif() -- GitLab