Skip to content

Commit

Permalink
fix ort wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon committed Nov 22, 2023
1 parent 2882c64 commit 82ffe5b
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 82ffe5b

Please sign in to comment.