From 30d8d114031b12e3a798fa1387cfef55e8a0f0ae Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 20 Apr 2022 10:23:07 +0800 Subject: [PATCH] fix inference custom op (#41999) --- cmake/inference_lib.cmake | 11 ++++++++++- cmake/phi_header.cmake | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1b38f20871..af2be77d0a 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -248,15 +248,24 @@ copy(inference_lib_dist copy(inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/common/*.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/common/) +copy(inference_lib_dist + SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/macros.h + DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/core/) +copy(inference_lib_dist + SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/visit_type.h + DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/core/) copy(inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/utils/any.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/) copy(inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/utils/optional.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/) - copy(inference_lib_dist +copy(inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/utils/none.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/) +copy(inference_lib_dist + SRCS ${PADDLE_SOURCE_DIR}/paddle/utils/flat_hash_map.h + DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/) copy(inference_lib_dist SRCS ${PADDLE_SOURCE_DIR}/paddle/extension.h DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/) diff --git a/cmake/phi_header.cmake b/cmake/phi_header.cmake index c9b7e46533..b23b4086b1 100644 --- a/cmake/phi_header.cmake +++ b/cmake/phi_header.cmake @@ -36,7 +36,8 @@ phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experiment phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/ext) phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/include) phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/common) +phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/core) # In order to be compatible with the original behavior, the header file name needs to be changed file(RENAME ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/extension.h - ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/ext_all.h) \ No newline at end of file + ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/ext_all.h) -- GitLab