Skip to content

[SYCL][E2E] Check for run-time features when in build-only #17988

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

Open
wants to merge 4 commits into
base: sycl
Choose a base branch
from

Conversation

ayylol
Copy link
Contributor

@ayylol ayylol commented Apr 11, 2025

Currently when we check REQUIRES/UNSUPPORTED statements in build-only mode we throw an error if any feature that is not in build_specific_features evaluates to true. Since this is error will only trigger when a test queries for one of these features, it can be easy to miss adding new build-specific features to this list (see #17985, and #17363).

This pr changes this check to be done for all features when in build-only, not just those queried by a test. If any available feature does not appear in build_specific_features then an error is thrown.

@ayylol ayylol requested a review from a team as a code owner April 11, 2025 21:05
@ayylol ayylol requested a review from sergey-semenov April 11, 2025 21:05
@ayylol ayylol temporarily deployed to WindowsCILock April 11, 2025 21:05 — with GitHub Actions Inactive
@ayylol ayylol requested a review from sarnex April 11, 2025 21:06
@ayylol ayylol temporarily deployed to WindowsCILock April 11, 2025 21:24 — with GitHub Actions Inactive
@sarnex
Copy link
Contributor

sarnex commented Apr 11, 2025

CI seems failing, ping me when PR is updated with the fix :)

@ayylol
Copy link
Contributor Author

ayylol commented Apr 14, 2025

CI seems failing, ping me when PR is updated with the fix :)

@sarnex, should be good to check now.

@@ -36,6 +36,12 @@ class E2EExpr(BooleanExpression):
"vulkan",
"hip_options",
"cuda_options",
"host=None",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind explaining why we need to error if an unknown feature is true at build time? If there's an feature not in this list and it evaluates as true at build time doesn't that tell us it's a build-time feature and we don't need the list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In build-only we ignore the run-time features because we expect them to always evaluate to false. So when a feature is not marked as build specific and it evaluates to true it means one of two things: It is a run-time feature which is incorrectly evaluating to true in build-only, or it is a build feature that was not added to the build features list, and thus we are incorrectly ignoring it. The latter is the more common case which I'm trying to make more visible. Since prior to these changes we would catch these issues only if the feature evaluated to true on the system, and was used in a REQUIRES/UNSUPPORTED.

The reason why we need the list, and cant just rely on the features that end up evaluating to true on build-only is because some of these features may evaluate to false on other systems/configurations, but we know that they should not be ignored. i.e., if we are missing the vulkan library we will fail building tests that require vulkan so this feature should not be ignored even if it evaluates to false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thanks for the clear explanation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means one of two things

Or, third option, this was mis-spelled and there is no such feature. Although maybe we catch that somewhere else now (there was a PR but I'm not sure if it was merged, @AlexeySachkov , @KornevNikita , @dm-vodopyanov might know?..)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this PR drowned in discussion (if you mean this one) ((maybe one day it will be finished)).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you linked to this pr, is that intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol of course not, I mean this one - #16019

@ayylol ayylol temporarily deployed to WindowsCILock April 14, 2025 19:48 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants