Skip to content

Commit aeac6b3

Browse files
committed
Support macos onnxruntime
1 parent 8b19586 commit aeac6b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mmdeploy/backend/onnxruntime/init_plugins.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def get_ops_path() -> str:
1313
candidates = [
1414
'../../lib/libmmdeploy_onnxruntime_ops.so',
1515
'../../lib/mmdeploy_onnxruntime_ops.dll',
16+
'../../lib/libmmdeploy_onnxruntime_ops.dylib',
1617
]
1718
return get_file_path(os.path.dirname(__file__), candidates)
1819

@@ -26,5 +27,6 @@ def get_lib_path() -> str:
2627
candidates = [
2728
'../../lib/libonnxruntime.so*',
2829
'../../lib/onnxruntime.dll',
30+
'../../lib/libmmdeploy_onnxruntime_ops.dylib',
2931
]
3032
return get_file_path(os.path.dirname(__file__), candidates)

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def get_extensions():
138138
# environment, the compiler will choose the appropriate compiler
139139
# to compile those cpp files, so there is no need to add the
140140
# argument
141-
if platform.system() != 'Windows':
141+
if platform.system() == 'Darwin':
142+
extra_compile_args['cxx'] = ['-std=c++17']
143+
elif platform.system() != 'Windows':
142144
extra_compile_args['cxx'] = ['-std=c++14']
143145

144146
include_dirs = []

0 commit comments

Comments
 (0)