未验证 提交 9d5b665c 编写于 作者: 王明冬 提交者: GitHub

[infrt] fix infrt ci test. test=develop, test=infrt (#38533)

上级 21366a92
...@@ -3,7 +3,7 @@ if (NOT WITH_INFRT) ...@@ -3,7 +3,7 @@ if (NOT WITH_INFRT)
endif() endif()
set(INFRT_SOURCE_DIR "${PADDLE_SOURCE_DIR}/paddle/infrt" ) set(INFRT_SOURCE_DIR "${PADDLE_SOURCE_DIR}/paddle/infrt" )
set(INFRT_BINARY_DIR "${PADDLE_BINARY_DIR}/paddle/infrt" ) set(INFRT_BINARY_DIR "${PADDLE_BINARY_DIR}/paddle/infrt" )
set(INFRT_TEST_TARGETS CACHE INTERNAL "")
include(infrt_lib) include(infrt_lib)
set(infrt_src CACHE INTERNAL "" FORCE) set(infrt_src CACHE INTERNAL "" FORCE)
...@@ -46,6 +46,7 @@ function(cc_test_tiny TARGET_NAME) ...@@ -46,6 +46,7 @@ function(cc_test_tiny TARGET_NAME)
if (${cc_test_tiny_SERIAL}) if (${cc_test_tiny_SERIAL})
set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1) set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1)
endif() endif()
set(INFRT_TEST_TARGETS ${INFRT_TEST_TARGETS} ${TARGET_NAME} CACHE INTERNAL "")
endif() endif()
endfunction() endfunction()
...@@ -83,3 +84,5 @@ message(STATUS "infrt srcs:\n${infrt_src}") ...@@ -83,3 +84,5 @@ message(STATUS "infrt srcs:\n${infrt_src}")
cc_library(infrt SHARED SRCS ${infrt_src} DEPS glog boost ${mlir_libs} paddle_framework_proto) cc_library(infrt SHARED SRCS ${infrt_src} DEPS glog boost ${mlir_libs} paddle_framework_proto)
cc_library(infrt_static SRCS ${infrt_src} DEPS glog boost ${mlir_libs} paddle_framework_proto) cc_library(infrt_static SRCS ${infrt_src} DEPS glog boost ${mlir_libs} paddle_framework_proto)
add_dependencies(infrt ${infrt_mlir_incs}) add_dependencies(infrt ${infrt_mlir_incs})
add_custom_target(test_infrt_exec DEPENDS ${INFRT_TEST_TARGETS})
...@@ -43,7 +43,7 @@ class TensorRTDialect : public ::mlir::Dialect { ...@@ -43,7 +43,7 @@ class TensorRTDialect : public ::mlir::Dialect {
using namespace mlir; // NOLINT using namespace mlir; // NOLINT
#define GET_OP_CLASSES #define GET_OP_CLASSES
#include "dialect/tensorrt/trt_ops.hpp.inc" #include "paddle/infrt/dialect/tensorrt/trt_ops.hpp.inc"
#undef GET_OP_CLASSES #undef GET_OP_CLASSES
} // namespace trt } // namespace trt
......
...@@ -11,12 +11,6 @@ gather_srcs(infrt_src SRCS ...@@ -11,12 +11,6 @@ gather_srcs(infrt_src SRCS
tensor.cc tensor.cc
) )
foreach(cpp ${SRCS})
set(infrt_src
"${infrt_src};infrt/paddle/${cpp}"
CACHE INTERNAL "")
endforeach()
file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h) file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h)
foreach(header ${includes}) foreach(header ${includes})
......
core_gather_headers()
gather_srcs(infrt_src SRCS
)
foreach(cpp ${SRCS})
set(infrt_src
"${infrt_src};infrt/paddle/cpp/${cpp}"
CACHE INTERNAL "")
endforeach()
file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h) file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h)
foreach(header ${includes}) foreach(header ${includes})
......
core_gather_headers()
gather_srcs(infrt_src SRCS gather_srcs(infrt_src SRCS
var_desc.cc var_desc.cc
op_desc.cc op_desc.cc
...@@ -7,12 +5,6 @@ gather_srcs(infrt_src SRCS ...@@ -7,12 +5,6 @@ gather_srcs(infrt_src SRCS
program_desc.cc program_desc.cc
) )
foreach(cpp ${SRCS})
set(infrt_src
"${infrt_src};infrt/paddle/pb/${cpp}"
CACHE INTERNAL "")
endforeach()
file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h) file(GLOB includes LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} *.h)
foreach(header ${includes}) foreach(header ${includes})
......
...@@ -65,13 +65,12 @@ function infrt_gen_and_build() { ...@@ -65,13 +65,12 @@ function infrt_gen_and_build() {
mkdir -p ${PADDLE_ROOT}/build mkdir -p ${PADDLE_ROOT}/build
cd ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build
rm -f infrt_summary.txt rm -f infrt_summary.txt
cmake .. -DWITH_MKL=OFF -DWITH_GPU=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_INFRT=ON -DWITH_TESTING==${WITH_TESTING:-ON}; build_error=$? cmake .. -DWITH_MKL=OFF -DWITH_GPU=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_INFRT=ON -DWITH_PYTHON=OFF -DWITH_TESTING==${WITH_TESTING:-ON}; build_error=$?
if [ "$build_error" != 0 ];then if [ "$build_error" != 0 ];then
exit 7; exit 7;
fi fi
make -j ${parallel_number} infrt infrtopt infrt-exec;build_error=$? make -j ${parallel_number} infrt infrtopt infrt-exec test_infrt_exec infrt_lib_dist;build_error=$?
make -j ${parallel_number} infrt_lib_dist;build_error=$?
if [ "$build_error" != 0 ];then if [ "$build_error" != 0 ];then
exit 7; exit 7;
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册