Skip to content

Commit d91a43e

Browse files
committed
fix cdll path
1 parent c311043 commit d91a43e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Python/ccpi/filters/utils.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import platform
22
import ctypes
3+
import os
34

45
if platform.system() == 'Linux':
56
dll = 'libcilreg.so'
@@ -11,7 +12,7 @@
1112
else:
1213
raise ValueError('Not supported platform, ', platform.system())
1314

14-
cilreg = ctypes.cdll.LoadLibrary(dll)
15+
cilreg = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), dll))
1516

1617
try:
1718
if platform.system() == 'Linux':
@@ -23,8 +24,8 @@
2324
gpudll = 'libcilregcuda.dylib'
2425
else:
2526
raise ValueError('Not supported platform, ', platform.system())
26-
27-
cilregcuda = ctypes.cdll.LoadLibrary(gpudll)
27+
28+
cilregcuda = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), gpudll))
2829
except OSError as ose:
2930
print(ose)
30-
cilregcuda = None
31+
cilregcuda = None

0 commit comments

Comments
 (0)