Skip to content

Commit 146c37e

Browse files
authored
Adapt code to use uv as a package manager (#5521)
Closes #4465 `Test with pip` is expected to fail until pytorch/pytorch#166829 is merged. Signed-off-by: Anatoly Myachev <[email protected]>
1 parent d59f085 commit 146c37e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

scripts/pti_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_pti_lib_path() -> pathlib.Path:
1313
"""
1414
files = importlib.metadata.files('intel-pti') or []
1515
for f in files:
16-
if f.name in ('libpti_view.so', 'pti_view.lib'):
16+
if any(map(lambda el: el in f.name, ('libpti_view.so', 'pti_view.lib'))): # pylint: disable=W0640
1717
return pathlib.Path(f.locate()).parent.resolve()
1818
raise AssertionError('libpti_view.so not found')
1919

scripts/sycl_rt_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_sycl_rt_lib_path() -> pathlib.Path:
1313
"""
1414
files = importlib.metadata.files('intel-sycl-rt') or []
1515
for f in files:
16-
if f.name == 'libsycl.so':
16+
if 'libsycl.so' in f.name:
1717
return pathlib.Path(f.locate()).parent.resolve()
1818
raise AssertionError('libsycl.so not found')
1919

scripts/torch_cmake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_torch_cmake_path() -> pathlib.Path:
1313
"""
1414
files = importlib.metadata.files('torch') or []
1515
for f in files:
16-
if f.name == 'TorchConfig.cmake':
16+
if 'TorchConfig.cmake' in f.name:
1717
return pathlib.Path(f.locate()).parent.resolve()
1818
raise AssertionError('TorchConfig.cmake not found')
1919

third_party/intel/backend/driver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ def find_sycl(include_dir: list[str]) -> tuple[list[str], list[str]]:
6969
for f in importlib.metadata.files("intel-sycl-rt"):
7070
# sycl/sycl.hpp and sycl/CL/sycl.hpp results in both folders
7171
# being add: include and include/sycl.
72-
if f.name == "sycl.hpp":
72+
if "sycl.hpp" in f.name:
7373
include_dir += [str(f.locate().parent.parent.resolve())]
74-
if f.name in ["libsycl.so", "sycl8.dll", "sycl8.lib"]:
74+
if any(map(lambda el: el in f.name, ("libsycl.so", "sycl8.dll", "sycl8.lib"))):
7575
sycl_dir = str(f.locate().parent.resolve())
7676
# should we handle `_` somehow?
7777
if os.name == "nt":

third_party/proton/proton/profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _select_backend() -> str:
2727
try:
2828
if (files := importlib.metadata.files('intel-pti')) is not None:
2929
for f in files:
30-
if f.name == 'libpti_view.so':
30+
if 'libpti_view.so' in f.name:
3131
os.environ["TRITON_XPUPTI_LIB_PATH"] = str(pathlib.Path(f.locate()).parent.resolve())
3232
break
3333
except importlib.metadata.PackageNotFoundError:

utils/SPIRVRunner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Alternatively, you can find `TorchConfig.cmake` with the following Python script
1818
import importlib.metadata
1919

2020
for f in importlib.metadata.files('torch'):
21-
if f.name == 'TorchConfig.cmake':
21+
if 'TorchConfig.cmake' in f.name:
2222
print(f.locate().resolve())
2323
```
2424

0 commit comments

Comments
 (0)