Skip to content

Commit

Permalink
fix ort wrapper (#2560)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon authored Nov 23, 2023
1 parent 2882c64 commit 8b19586
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mmdeploy/backend/onnxruntime/init_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_lib_path() -> str:
str: The library path to onnxruntime.
"""
candidates = [
'../../lib/libonnxruntime_ops.so*',
'../../lib/libonnxruntime.so*',
'../../lib/onnxruntime.dll',
]
return get_file_path(os.path.dirname(__file__), candidates)
2 changes: 1 addition & 1 deletion mmdeploy/backend/onnxruntime/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self,
# load ort lib before custom ops lib
lib_path = get_lib_path()
if osp.exists(lib_path):
ctypes.DLL(lib_path)
ctypes.CDLL(lib_path)

session_options.register_custom_ops_library(ort_custom_op_path)
logger.info('Successfully loaded onnxruntime custom ops from '
Expand Down

0 comments on commit 8b19586

Please sign in to comment.