-
Notifications
You must be signed in to change notification settings - Fork 749
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
[RFC][SYCL][E2E] Use REQUIRES
/UNSUPPORTED
in build-only
mode
#16528
base: sycl
Are you sure you want to change the base?
Conversation
Some other ideas considered:
|
"opencl-aot" :FeatureInfo(device_agnostic=True), | ||
"ocloc" :FeatureInfo(device_agnostic=True), | ||
"opencl_icd" :FeatureInfo(device_agnostic=True), | ||
"cl_options" :FeatureInfo(device_agnostic=True), |
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.
imo we have a relatively few number of tests that fail because of the triple or device stuff. i think supporting environment stuff like the OS is important, i think its fine to force those few number of tests require the build and run mode
having a hardcoded list of keywords and having different support for logical expressions than normal LIT kind of worries me
Currently the
build-only
mode does not take into account the features to decide if a test should be built on the system/for a particular triple. Instead explicit markup is used to mark these tests as unsupported.A complication that occurs when trying to take into account features in
build-only
is that we do not have the devices that the tests are being built for, and thus we do not have the device specific features associated with them. Usually the device-specific features will not affect compilation, however this is not always the case, as certain features may implicitly exclude a particular triple. For example consider the featureaccelerator
. If we see aREQUIRES: accelerator
this test would have never been built CUDA, or AMD triples, as those only support GPU devices. On the other hand however aUNSUPPORTED: accelerator
statement would not exclude the spir triple, as that triple could be run on other non-accelerator devices.Due to this we likely need to alter the way we use
REQUIRES
/UNSUPPORTED
statements in order to support this. I'm looking for comments on what would be acceptable changes to our usage of those directives such that we can handle these statements inbuild-only
mode while not adding too large of a burden on test writers.This pr contains a potential solution which works by trying to construct a set of features to pass the
REQUIRES
/UNSUPPORTED
statements. ForREQUIRES
statements we begin with the set of device-agnostic features that we already have from the environment, and add all the device-specific features listed in the statement that could possibly appear for the triple. For example, When considering a statement likeREQUIRES: accelerator
, theaccelerator
feature would be added when building for thespir64
triple, since it may or may not be present, however it would not be added for thenvptx-nvidia-cuda
triple since we know for certain it could never be present for that triple. We considerUNSUPPORTED
statements in a similar manner, however for the device-specific features here we only add them to our list of features if we know for certain a feature will always be present for a given triple. In this case if we seeUNSUPPORTED: gpu
we would not add thegpu
feature for thespir64
triple, however we would add it for thenvptx-nvidia-cuda
triple.Because this method works off the assumption that we want all features listed in
REQUIRES
and none of the features listed inUNSUPPORTED
this solution cannot support negations in either of these statements (i.e.,REQUIRES: !gpu
). The changes in this pr handle these situations by emitting a warning when a negation is found, and ignoring the clause including it when inbuild-only
mode. This limitation only applies to 6 tests currently, and a majority of these negations can be removed by exchangingREQUIRES
statements withUNSUPPORTED
and vice versa. Currently the only problematic cases are the ones listed intest/e2e_test_requirements/no-negations-in-tests.cpp
which contains statements in the form ofUNSUPPORTED: x && !y