Skip to content

Commit 4d64e2a

Browse files
authored
[CI][Benchmarks] fix LD_LIBRARY_PATH set for compute runtime (#18951)
The LD_LIBRARY_PATH for the level-zero loader and gmmlib, which are dependencies of compute runtime, was set incorrectly to lib64. This led to compatibility issues when running benchmarks. This patch sets the correct path and adds a warning message so that it's easier to notice such issues in the future.
1 parent 1d7e9ef commit 4d64e2a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

devops/scripts/benchmarks/utils/compute_runtime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def __init__(self):
3030

3131
def ld_libraries(self) -> list[str]:
3232
paths = [
33-
os.path.join(self.gmmlib, "lib64"),
34-
os.path.join(self.level_zero, "lib64"),
33+
os.path.join(self.gmmlib, "lib"),
34+
os.path.join(self.level_zero, "lib"),
3535
os.path.join(self.compute_runtime, "bin"),
3636
]
3737

devops/scripts/benchmarks/utils/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ def run(
3434
env = os.environ.copy()
3535

3636
for ldlib in ld_library:
37-
env["LD_LIBRARY_PATH"] = ldlib + os.pathsep + env.get("LD_LIBRARY_PATH", "")
37+
if os.path.isdir(ldlib):
38+
env["LD_LIBRARY_PATH"] = (
39+
ldlib + os.pathsep + env.get("LD_LIBRARY_PATH", "")
40+
)
41+
else:
42+
print(f"Warning: LD_LIBRARY_PATH component does not exist: {ldlib}")
3843

3944
# order is important, we want provided sycl rt libraries to be first
4045
if add_sycl:

0 commit comments

Comments
 (0)