Skip to content

[SYCL][E2E] Fix error reporting in e2e lit config #18535

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

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def get_sycl_ls_verbose(sycl_device, env):
f"stdout:{sp.stdout}\n"
f"stderr:{sp.stderr}\n"
)
return sp.stdout.splitlines()
return sp


# A device filter such as level_zero:gpu can have multiple devices under it and
Expand Down Expand Up @@ -893,7 +893,7 @@ def get_sycl_ls_verbose(sycl_device, env):

platform_devices = remove_level_zero_suffix(backend + ":*")

for line in get_sycl_ls_verbose(platform_devices, env):
for line in get_sycl_ls_verbose(platform_devices, env).stdout.splitlines():
if re.match(r" *Architecture:", line):
_, architecture = line.strip().split(":", 1)
detected_architectures.append(architecture.strip())
Expand Down Expand Up @@ -952,7 +952,8 @@ def get_sycl_ls_verbose(sycl_device, env):
# See format.py's parse_min_intel_driver_req for explanation.
is_intel_driver = False
intel_driver_ver = {}
for line in get_sycl_ls_verbose(sycl_device, env):
sycl_ls_sp = get_sycl_ls_verbose(sycl_device, env)
for line in sycl_ls_sp.stdout.splitlines():
if re.match(r" *Vendor *: Intel\(R\) Corporation", line):
is_intel_driver = True
if re.match(r" *Driver *:", line):
Expand Down Expand Up @@ -989,7 +990,7 @@ def get_sycl_ls_verbose(sycl_device, env):
if dev_aspects == []:
lit_config.error(
"Cannot detect device aspect for {}\nstdout:\n{}\nstderr:\n{}".format(
sycl_device, sp.stdout, sp.stderr
sycl_device, sycl_ls_sp.stdout, sycl_ls_sp.stderr
)
)
dev_aspects.append(set())
Expand All @@ -1001,7 +1002,7 @@ def get_sycl_ls_verbose(sycl_device, env):
if dev_sg_sizes == []:
lit_config.error(
"Cannot detect device SG sizes for {}\nstdout:\n{}\nstderr:\n{}".format(
sycl_device, sp.stdout, sp.stderr
sycl_device, sycl_ls_sp.stdout, sycl_ls_sp.stderr
)
)
dev_sg_sizes.append(set())
Expand All @@ -1024,7 +1025,7 @@ def get_sycl_ls_verbose(sycl_device, env):
if not config.allow_unknown_arch:
lit_config.error(
"Cannot detect architecture for {}\nstdout:\n{}\nstderr:\n{}".format(
sycl_device, sp.stdout, sp.stderr
sycl_device, sycl_ls_sp.stdout, sycl_ls_sp.stderr
)
)
architectures = set()
Expand Down
Loading