Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support macos onnxruntime #2577

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support macos onnxruntime
huzhenhong committed Nov 29, 2023
commit aeac6b34318fe7aedf5515c72aefa8a7d9937d5b
2 changes: 2 additions & 0 deletions mmdeploy/backend/onnxruntime/init_plugins.py
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ def get_ops_path() -> str:
candidates = [
'../../lib/libmmdeploy_onnxruntime_ops.so',
'../../lib/mmdeploy_onnxruntime_ops.dll',
'../../lib/libmmdeploy_onnxruntime_ops.dylib',
]
return get_file_path(os.path.dirname(__file__), candidates)

@@ -26,5 +27,6 @@ def get_lib_path() -> str:
candidates = [
'../../lib/libonnxruntime.so*',
'../../lib/onnxruntime.dll',
'../../lib/libmmdeploy_onnxruntime_ops.dylib',
]
return get_file_path(os.path.dirname(__file__), candidates)
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -138,7 +138,9 @@ def get_extensions():
# environment, the compiler will choose the appropriate compiler
# to compile those cpp files, so there is no need to add the
# argument
if platform.system() != 'Windows':
if platform.system() == 'Darwin':
extra_compile_args['cxx'] = ['-std=c++17']
elif platform.system() != 'Windows':
extra_compile_args['cxx'] = ['-std=c++14']

include_dirs = []