Skip to content

Commit

Permalink
Support macos onnxruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
huzhenhong committed Nov 29, 2023
1 parent 8b19586 commit aeac6b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mmdeploy/backend/onnxruntime/init_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Up @@ -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 = []
Expand Down

0 comments on commit aeac6b3

Please sign in to comment.