Skip to content

Commit db38c44

Browse files
xuhancnpytorchmergebot
authored andcommitted
[inductor] add libraries_dirs for level_zero (#161146)
Changes: 1. change set `include_dirs` to append value. 2. add append `libraries_dirs` for level_zero. Pull Request resolved: #161146 Approved by: https://github.com/angelayi
1 parent 1e3fe78 commit db38c44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch/_inductor/cpp_builder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,8 @@ def get_cpp_torch_device_options(
13971397
ze_root = os.getenv("LEVEL_ZERO_V1_SDK_PATH")
13981398
if ze_root is None:
13991399
raise OSError(xpu_error_string)
1400-
include_dirs = [os.path.join(ze_root, "include")]
1400+
include_dirs += [os.path.join(ze_root, "include")]
1401+
libraries_dirs += [os.path.join(ze_root, "lib")]
14011402
libraries += ["c10_xpu", "sycl", "ze_loader", "torch_xpu"]
14021403
else:
14031404
# Suppress multi-line comment warnings in sycl headers

0 commit comments

Comments
 (0)