-
Notifications
You must be signed in to change notification settings - Fork 772
[SYCL][E2E] Fix -Werror failures in implicitly SPIR only DeviceLib tests #18995
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?
Conversation
The `-fsycl-device-lib-jit-link` only has an effect in SPIR compilation so these tests would fail with `-Werror` for non SPIR targets. This basically the same as intel#18985, but also apply it to tests that have `UNSUPPORTED: target-amd || target-nvidia`. These tests could be enabled for future non-SPIR targets we should not be assuming that `!target-amd && !target-nvidia` implies SPIR.
@@ -1,7 +1,7 @@ | |||
// RUN: %{build} -o %t1.out | |||
// RUN: %{run} %t1.out | |||
|
|||
// RUN: %{build} -fno-builtin -fsycl-device-lib-jit-link -o %t2.out | |||
// RUN: %{build} -Wno-error=unused-command-line-argument -fno-builtin -fsycl-device-lib-jit-link -o %t2.out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aelovikov-intel, is there a cleaner way to handle the problem with %if
?
If I get it right, we are supposed to add -fsycl-device-lib-jit-link
only when we compile for spir target(s). I can't find similar examples in the existing tests. Do you know if there is a condition we can use e.g. %if spir %{-fsycl-device-lib-jit-link}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. We have something similar in
Lines 251 to 254 in 610d42a
# TODO: Maybe that should be link-only option, so that we wouldn't | |
# need to suppress the warning below for compile-only commands. | |
sycl_target_opts += " -fsycl-use-spirv-backend-for-spirv-gen -Wno-unused-command-line-argument" | |
substitutions.append(("%{sycl_target_opts}", sycl_target_opts)) |
And based on some lines above that there might be %if target-spir
. If it doesn't work, then
Lines 343 to 357 in 610d42a
conditions = {x: True for x in parsed_dev_name.split(":")} | |
for cond_features in [ | |
"linux", | |
"windows", | |
"preview-breaking-changes-supported", | |
]: | |
if cond_features in test.config.available_features: | |
conditions[cond_features] = True | |
tmp_script = lit.TestRunner.applySubstitutions( | |
tmp_script, | |
[], | |
conditions, | |
recursion_limit=test.config.recursiveExpansionLimit, | |
) |
We have |
Are you asking me or @Maetveis ? |
The author of the text from the PR description quoted in my comment. |
The
-fsycl-device-lib-jit-link
only has an effect in SPIR compilation so these tests would fail with-Werror
for non SPIR targets.This basically the same as #18985, but also apply it to tests that have
UNSUPPORTED: target-amd || target-nvidia
. These tests could be enabled for future non-SPIR targets; we should not be assuming that!target-amd && !target-nvidia
implies SPIR.