[Draft][SYCL][E2E] Detect supported aspects at config time #9121
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.
This commit introduces a framework to make better use of LIT's UNSUPPORTED test category by detecting supported aspects at LIT configuration time. Until now the E2E tests would exit early and PASS, which is arguably a misleading classification.
The method determines aspects at configuration time by compiling and then running a program. The output of this program is a semicolon-separated list of supported aspects on the default device as either '1' or '0', in an order determined by the python script. The script captures this output and sets features as available where the corresponding aspect is '1'.
As a proof of concept, several tests which silently pass when fp16 and fp64 are unsupported have been converted to use this system.
The method is easily extendible with new aspects. Several E2E tests make use of USM shared allocations without first checking the device, so a follow-up commit would likely make that aspect a feature too.