-
Notifications
You must be signed in to change notification settings - Fork 790
[Benchmarks] Print all important env vars in debug logs #20415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,28 +52,36 @@ def run( | |
|
||
for ldlib in ld_library: | ||
if os.path.isdir(ldlib): | ||
env["LD_LIBRARY_PATH"] = ( | ||
ldlib + os.pathsep + env.get("LD_LIBRARY_PATH", "") | ||
env_vars["LD_LIBRARY_PATH"] = os.pathsep.join( | ||
filter(None, [ldlib, env_vars.get("LD_LIBRARY_PATH", "")]) | ||
) | ||
else: | ||
log.warning(f"LD_LIBRARY_PATH component does not exist: {ldlib}") | ||
|
||
# order is important, we want provided sycl rt libraries to be first | ||
if add_sycl: | ||
sycl_bin_path = os.path.join(options.sycl, "bin") | ||
env["PATH"] = sycl_bin_path + os.pathsep + env.get("PATH", "") | ||
env_vars["PATH"] = os.pathsep.join( | ||
filter(None, [sycl_bin_path, env_vars.get("PATH", "")]) | ||
) | ||
sycl_lib_path = os.path.join(options.sycl, "lib") | ||
env["LD_LIBRARY_PATH"] = ( | ||
sycl_lib_path + os.pathsep + env.get("LD_LIBRARY_PATH", "") | ||
env_vars["LD_LIBRARY_PATH"] = os.pathsep.join( | ||
filter(None, [sycl_lib_path, env_vars.get("LD_LIBRARY_PATH", "")]) | ||
) | ||
|
||
env.update(env_vars) | ||
|
||
command_str = " ".join(command) | ||
env_str = " ".join(f"{key}={value}" for key, value in env_vars.items()) | ||
full_command_str = f"{env_str} {command_str}".strip() | ||
log.debug(f"Running: {full_command_str}") | ||
|
||
# Prepend new value to existing env value | ||
for key, value in env_vars.items(): | ||
old_value = env.get(key, "") | ||
if old_value: | ||
env[key] = os.pathsep.join([value, old_value]) | ||
|
||
else: | ||
env[key] = value | ||
|
||
# Normalize input to bytes if it's a str | ||
if isinstance(input, str): | ||
input_bytes = input.encode() | ||
|
Uh oh!
There was an error while loading. Please reload this page.