mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-21 15:49:31 +08:00
[Paddle2ONNX] switch paddle2onnx default policy (#1873)
This commit is contained in:
@@ -77,8 +77,8 @@ option(WITH_TESTING "Whether to compile with unittest." OFF)
|
||||
option(WITH_CAPI "Whether to compile with c api." OFF)
|
||||
option(WITH_CSHARPAPI "Whether to compile with c# api" OFF)
|
||||
|
||||
# Whether to build fastdeploy with vision/text/... examples, only for testings.
|
||||
option(BUILD_EXAMPLES "Whether to build fastdeploy with vision examples" OFF)
|
||||
option(BUILD_PADDLE2ONNX "Whether to build paddle2onnx from sources" OFF)
|
||||
|
||||
######################### Paths to user's custom libraries directory #####################
|
||||
set(CUDA_DIRECTORY "" CACHE PATH "If build tensorrt backend, need to define path of cuda library.")
|
||||
@@ -425,7 +425,6 @@ if(ENABLE_ENCRYPTION)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PADDLE2ONNX)
|
||||
set(BUILD_PADDLE2ONNX ON)
|
||||
add_definitions(-DENABLE_PADDLE2ONNX)
|
||||
if(BUILD_PADDLE2ONNX)
|
||||
download_protobuf()
|
||||
|
@@ -77,7 +77,12 @@ else()
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-aarch64-${ONNXRUNTIME_VERSION}.tgz")
|
||||
else()
|
||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz")
|
||||
# cross-compling while the host is x64 but the target is aarch64.
|
||||
if ((CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "arm"))
|
||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-aarch64-${ONNXRUNTIME_VERSION}.tgz")
|
||||
else()
|
||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -41,6 +41,6 @@ if (DEFINED TARGET_ABI)
|
||||
set(OpenCV_DIR ${THIRD_PARTY_PATH}/install/opencv/lib/cmake/opencv4)
|
||||
else()
|
||||
message(FATAL_ERROR "When cross-compiling, please set the -DTARGET_ABI to arm64 or armhf.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user