[FRONTEND] Support alternative install locations of system libdevice.10.bc (#951)
This commit is contained in:
committed by
GitHub
parent
e419781978
commit
9490252261
18
python/tests/libdevice_testutil.py
Normal file
18
python/tests/libdevice_testutil.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
_SYSTEM_LIBDEVICE_SEARCH_PATHS = [
|
||||
'/usr/lib/cuda/nvvm/libdevice/libdevice.10.bc',
|
||||
'/usr/local/cuda/nvvm/libdevice/libdevice.10.bc',
|
||||
]
|
||||
|
||||
SYSTEM_LIBDEVICE_PATH: Optional[str] = None
|
||||
for _p in _SYSTEM_LIBDEVICE_SEARCH_PATHS:
|
||||
if os.path.exists(_p):
|
||||
SYSTEM_LIBDEVICE_PATH = _p
|
||||
|
||||
def system_libdevice_path() -> str:
|
||||
assert SYSTEM_LIBDEVICE_PATH is not None, \
|
||||
"Could not find libdevice.10.bc path"
|
||||
return SYSTEM_LIBDEVICE_PATH
|
||||
|
Reference in New Issue
Block a user