[SYCL][E2E] Implement support for REQUIRES in build-only mode #16716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In general we cannot separate
build only features from features that only have an effect during
execution. Consider a
REQUIRES
expression containing a mix of runtimeand build time features. If the expression evaluates to false in
build-only we would have to solve a Satisfiability (SAT) problem to
check if it only failed due to missing run-time features.
The below design is motivated by this and the fact that current
REQUIRES
,UNSUPPORTED
andXFAIL
lines assume that both run-time(per-device) and build only features are available.
Add a new directive
ENABLE_RUN_REQUIRES: true
, which, if present, changesthe evaluation of
REQUIRES
,UNSUPPORTED
andXFAIL
directives toonly consider device-agnostic features. This allows them to be correctly
evaluated during
test-mode="build-only"
too. To express per-device(run-time) requirements the directives
RUN_REQUIRES
,RUN_UNSUPPORTED
and
RUN_XFAIL
can be added.The config and directive takes a boolean value to allow gradual adoption
of the feature.
This commit does not yet change the documentation of the
test-mode
parameter in README.md, if this looks like a good direction I can do
that too with help on the wording.
I also have not figured out how this should interact with #16306 yet, @ayylol input welcome.
I personally made these changes because I encountered this limitation during personal testing with build-only mode in Intel internal repositories, hopefully nobody else was actively working on this.