File tree Expand file tree Collapse file tree
gpustack_runtime/detector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def is_supported() -> bool:
6262 pyixml .nvmlShutdown ()
6363 supported = True
6464 except pyixml .NVMLError :
65- debug_log_exception (logger , "Failed to initialize IXML library " )
65+ debug_log_exception (logger , "Failed to initialize IXML" )
6666
6767 return supported
6868
@@ -102,7 +102,7 @@ def detect(self) -> Devices | None:
102102
103103 sys_runtime_ver_original = None
104104 sys_runtime_ver = None
105- with contextlib .suppress (pyixml . NVMLError ):
105+ with contextlib .suppress (Exception ):
106106 sys_runtime_ver_original = pyixml .nvmlSystemGetCudaDriverVersion ()
107107 sys_runtime_ver_original = "." .join (
108108 map (
Original file line number Diff line number Diff line change 2828# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2929# THE POSSIBILITY OF SUCH DAMAGE.
3030#####
31+ import os
3132
3233##
3334# Python bindings for the NVML library
@@ -2162,8 +2163,20 @@ def _LoadNvmlLibrary():
21622163 # Linux path
21632164 locs = [
21642165 "libixml.so" ,
2165- str (Path (__file__ ).resolve ().parent / "libixml.so" ),
21662166 ]
2167+ for default_path in [
2168+ "/usr/local/corex" ,
2169+ ]:
2170+ iluvatar_path = Path (
2171+ os .getenv ("COREX_HOME" , default_path ),
2172+ )
2173+ if iluvatar_path .exists ():
2174+ locs .extend (
2175+ [
2176+ str (iluvatar_path / "lib64/libixml.so" ),
2177+ str (iluvatar_path / "lib/libixml.so" ),
2178+ ]
2179+ )
21672180 for loc in locs :
21682181 try :
21692182 nvmlLib = CDLL (loc )
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def is_supported() -> bool:
6464 pyhgml .hgmlShutdown ()
6565 supported = True
6666 except pyhgml .HGMLError :
67- debug_log_exception (logger , "Failed to initialize HGML library " )
67+ debug_log_exception (logger , "Failed to initialize HGML" )
6868
6969 return supported
7070
You can’t perform that action at this time.
0 commit comments