mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +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:
@@ -46,7 +46,16 @@ 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 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