mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-24 00:53:22 +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_CAPI "Whether to compile with c api." OFF)
|
||||||
option(WITH_CSHARPAPI "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_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 #####################
|
######################### Paths to user's custom libraries directory #####################
|
||||||
set(CUDA_DIRECTORY "" CACHE PATH "If build tensorrt backend, need to define path of cuda library.")
|
set(CUDA_DIRECTORY "" CACHE PATH "If build tensorrt backend, need to define path of cuda library.")
|
||||||
@@ -425,7 +425,6 @@ if(ENABLE_ENCRYPTION)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PADDLE2ONNX)
|
if(ENABLE_PADDLE2ONNX)
|
||||||
set(BUILD_PADDLE2ONNX ON)
|
|
||||||
add_definitions(-DENABLE_PADDLE2ONNX)
|
add_definitions(-DENABLE_PADDLE2ONNX)
|
||||||
if(BUILD_PADDLE2ONNX)
|
if(BUILD_PADDLE2ONNX)
|
||||||
download_protobuf()
|
download_protobuf()
|
||||||
|
@@ -76,10 +76,15 @@ else()
|
|||||||
else()
|
else()
|
||||||
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
|
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-aarch64-${ONNXRUNTIME_VERSION}.tgz")
|
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-aarch64-${ONNXRUNTIME_VERSION}.tgz")
|
||||||
|
else()
|
||||||
|
# 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()
|
else()
|
||||||
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz")
|
set(ONNXRUNTIME_FILENAME "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(ONNXRUNTIME_URL "${ONNXRUNTIME_URL_PREFIX}${ONNXRUNTIME_FILENAME}")
|
set(ONNXRUNTIME_URL "${ONNXRUNTIME_URL_PREFIX}${ONNXRUNTIME_FILENAME}")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user