Skip to content

[SYCL][E2E] Add a test to track UNSUPPORTED tests #15849

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

Merged
merged 11 commits into from
Oct 28, 2024

Conversation

KornevNikita
Copy link
Contributor

Similar to XFAIL tests (no-xfail-without-tracker.cpp) adding a requirement to follow UNSUPPORTED by UNSUPPORTED-TRACKER.

Adding a test to track the amount and the list of improperly UNSUPPORTED tests.

Also update some tests to check the script.

Similar to XFAIL tests (no-xfail-without-tracker.cpp) adding a
requirement to follow UNSUPPORTED by UNSUPPORTED-TRACKER.

Adding a test to track the amount and the list of improperly UNSUPPORTED
tests.

Also update some tests to check the script.
@KornevNikita
Copy link
Contributor Author

@steffenlarsen @AlexeySachkov I know you suggested "UNSUPPORTED-REASON", but if you don't mind I'd prefer "UNSUPPORTED-TRACKER" to unify this with XFAIL, so we don't have to remember what and where we should use. Or any other unified mark.

@KornevNikita
Copy link
Contributor Author

NOTE: need to re-run pre-commit before merging.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Let's get it running!

Copy link
Contributor

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

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

I still prefer -REASON, but that's not a strong enough objection to block the PR.

I think it is good to be merged. @KornevNikita, could you please do a local merge + test and if everything is fine, let me know and I will press the merge button (we don't really need to re-run the whole CI for this PR).

@@ -5,6 +5,9 @@
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_intel_grf_size.asciidoc
// REQUIRES: arch-intel_gpu_pvc || gpu-intel-dg2
// UNSUPPORTED: cuda || hip
// UNSUPPORTED-INTENDED: This extension is currently implemented in DPC++ only
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to the main change in the PR, but tagging @sarnex here. I'm not sure if having an optional property unguarded by an aspect is a good interface for end users. Even if we don't introduce an aspect, can we update the spec to say that submitting a kernel with grf property to a device and/or using a backend which doesn't support that results in an exception? This way we would be able to rewrite the test to avoid use of `UNSUPPORTED.

Moreover, we have REQUIRES which points to specific GPUs, do we even need UNSUPPORTED in that case?

// RUN: grep -rI "UNSUPPORTED:" %S/../../test-e2e \
// RUN: -A 1 --include=*.c --include=*.cpp --no-group-separator | \
// RUN: grep -v "UNSUPPORTED:" | \
// RUN: grep -Pv "UNSUPPORTED-TRACKER:\s+(?:https://github.com/[\w\d-]+/[\w\d-]+/issues/[\d]+)|(?:[\w]+-[\d]+)|(?:UNSUPPORTED-INTENDED:\s*.+)" > %t
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// RUN: grep -Pv "UNSUPPORTED-TRACKER:\s+(?:https://github.com/[\w\d-]+/[\w\d-]+/issues/[\d]+)|(?:[\w]+-[\d]+)|(?:UNSUPPORTED-INTENDED:\s*.+)" > %t
// RUN: grep -Pv "UNSUPPORTED-TRACKER:\s+(?:https://github.com/[\w\d-]+/[\w\d-]+/issues/[\d]+)|(?:[\w]+-[\d]+)|(?:UNSUPPORTED-INTENDED:\s\w.*)" > %t
  • to require nice formatting (i.e. exactly one spacing symbol after -INDENDED:
  • to require at least single alphanumeric symbol as an explanation. Not that it would prevent all possible malformed explanations, but that's at least something.

But that is mostly a minor comment, I believe that formatting and reasoning will be up to reviewers anyways.

// - ...and check if the list of improperly UNSUPPORTED tests needs to be updated.
//
// RUN: grep -rI "UNSUPPORTED:" %S/../../test-e2e \
// RUN: -A 1 --include=*.c --include=*.cpp --no-group-separator | \
Copy link
Contributor

Choose a reason for hiding this comment

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

.c include is a certain legacy from XFAIL test: I'm not entirely sure if we ever should have any .c tests. SYCL is C++17

That's minor, we can address it in a follow-up PR for both XFAIL and UNSUPPORTED

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like there are no .c tests in test-e2e at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there are no .c tests in test-e2e at all.

Yeah, there shouldn't be. I probably followed suffixes which we have listed in lit.cfg.py. In any case I don't think that it is possible to use -fsycl in C mode, or use SYCL headers in .c mode, so I think that we can do a separate cleanup everywhere to explicitly say that .c is not considered as a test for us and drop it from XFAIL/UNSUPPORTED checks

@AlexeySachkov
Copy link
Contributor

The update to the PR is very small (one more test was recorded as improperly unsupported), @KornevNikita verified it locally and I don't think that it is reasonable to wait for the whole pre-commit and risk the new test being broken again by some other PRs going in. Therefore, I plan to cancel the remaining of the pre-commit and proceed with the merge.

@KornevNikita, please monitor sycl branch state after the merge (i.e. post-commit) to quickly send any follow-up PRs if we happen to have conflicts with other PRs merged whilst I was writing this comment

@AlexeySachkov AlexeySachkov merged commit e427e2f into intel:sycl Oct 28, 2024
3 of 10 checks passed
@AlexeySachkov
Copy link
Contributor

AlexeySachkov commented Oct 28, 2024

Also tagging @intel/llvm-gatekeepers here for awareness: any PR which deals with UNSUPPORTED directives and had passed pre-commit before this change was merged have to be re-tested, or otherwise we will see failures in both post and pre-commits.

Those failures will be easy to address, but still pinging you explicitly for awareness.

// - in the result, search for "UNSUPPORTED" again, but invert the result - this
// allows us to get the line *after* UNSUPPORTED
// - in those lines, check that UNSUPPORTED-TRACKER or UNSUPPORTED-INTENDED is
// present and correct. Once again, invert the search to get all "bad" lines
Copy link
Contributor

Choose a reason for hiding this comment

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

i didnt actually review the code but i can say it looks correct to run in check-sycl, thanks!

@ayylol
Copy link
Contributor

ayylol commented Oct 29, 2024

Hey, just wanted to ask if there are plans to deal with other ways that tests are currently marked as unsupported not directly through the unsupported keyword. The two cases I am aware of would be, requiring a feature that doesn't exist (in the cases i've seen TEMPORARY_DISABLED), or misspelling RUN: (as RUNx: in the examples i've seen) so that certain lines are not picked up.

Some examples:

@sarnex
Copy link
Contributor

sarnex commented Oct 29, 2024

IMO we should fix all of those to use UNSUPPORTED and if it's possible add a test to verify anything unsupported is using UNSUPPORTED

@KornevNikita
Copy link
Contributor Author

Hey, just wanted to ask if there are plans to deal with other ways that tests are currently marked as unsupported not directly through the unsupported keyword. The two cases I am aware of would be, requiring a feature that doesn't exist (in the cases i've seen TEMPORARY_DISABLED), or misspelling RUN: (as RUNx: in the examples i've seen) so that certain lines are not picked up.

Some examples:

RIght, we plan to update TEMPORARY_DISABLED tests to use UNSUPPORTED. But currently UNSUPPORTED: * results in failed test, so need to update this behavior first.

@bader
Copy link
Contributor

bader commented Oct 29, 2024

I suggest removing the RUNx: command in this specific test.

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.

7 participants