mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
[cmake] update paddle inference osx lib (#1859)
* [cmake] update paddle inference osx lib * Update __init__.py * Update __init__.py * Update paddle_inference.cmake * Update __init__.py
This commit is contained in:
@@ -99,12 +99,13 @@ else()
|
||||
elseif(APPLE)
|
||||
if(CURRENT_OSX_ARCH MATCHES "arm64")
|
||||
message(FATAL_ERROR "Paddle Backend doesn't support Mac OSX with Arm64 now.")
|
||||
set(PADDLEINFERENCE_FILE "paddle_inference-osx-arm64-openblas-0.0.0.660f781b77.tgz")
|
||||
else()
|
||||
# TODO(qiuyanjun): Should remove this old paddle inference lib
|
||||
set(PADDLEINFERENCE_FILE "paddle_inference-osx-x86_64-2.4-dev3.tgz")
|
||||
# TODO(qiuyanjun): Should use the commit id to tag the version
|
||||
set(PADDLEINFERENCE_VERSION "2.4-dev3")
|
||||
# set(PADDLEINFERENCE_FILE "paddle_inference-osx-x86_64-2.4-dev3.tgz")
|
||||
set(PADDLEINFERENCE_FILE "paddle_inference-osx-x86_64-openblas-0.0.0.660f781b77.tgz")
|
||||
endif()
|
||||
set(PADDLEINFERENCE_VERSION "0.0.0.660f781b77")
|
||||
else()
|
||||
# Linux with x86 CPU/Arm CPU/GPU/IPU ...
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
|
@@ -46,6 +46,15 @@ if os.name != "nt" and os.path.exists(trt_directory):
|
||||
# This solution will be removed it when the confilct of paddle and
|
||||
# fastdeploy is fixed.
|
||||
try:
|
||||
# import paddle
|
||||
import platform
|
||||
sys_platform = platform.platform().lower()
|
||||
# windows: no conflict between fastdeploy and paddle.
|
||||
# linux: must import paddle first to solve the conflict.
|
||||
# macos: still can not solve the conflict between fastdeploy and paddle,
|
||||
# due to the global flags redefined in paddle/paddle_inference so.
|
||||
# we got the error (ERROR: flag 'xxx' was defined more than once).
|
||||
if "linux" in sys_platform:
|
||||
import paddle
|
||||
except:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user