Skip to content

[SYCL][E2E][Docs] Update test-mode documentation #16875

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 12 commits into from
Mar 5, 2025
Merged

Conversation

ayylol
Copy link
Contributor

@ayylol ayylol commented Feb 3, 2025

Changes documentation of build-only mode to reflect the recent improvements in this mode.

@ayylol ayylol requested a review from a team as a code owner February 3, 2025 17:59
@ayylol ayylol changed the title [SYCL][E2E] Document changes to build-only from #16725 [SYCL][E2E][Docs] Document changes to evaluating REQUIRES/UNSUPPORTED in build-only Feb 3, 2025
@ayylol ayylol marked this pull request as draft February 3, 2025 18:18
@Maetveis
Copy link
Contributor

Hey @ayylol can this be undrafted now?

@ayylol ayylol changed the title [SYCL][E2E][Docs] Document changes to evaluating REQUIRES/UNSUPPORTED in build-only [SYCL][E2E][Docs] Update test-mode documentation Feb 21, 2025
@ayylol
Copy link
Contributor Author

ayylol commented Feb 21, 2025

This is dependent on the changes from #17023

@ayylol ayylol marked this pull request as ready for review February 21, 2025 19:40
Comment on lines 420 to 421
If an expression's final value is unknown we consider it to have met the
requirements. The list of device-agnostic features that are not considered
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make a few examples for both REQUIRES and UNSUPPORTED. I'm also not sure about the wording being precise here, but let's start with the examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some examples. LMK if anymore should be added or those are fine.

lit parameter. Valid build targets are: `spir`,`nvidia`, `amd`, `native_cpu`.
These correspond to `spir64`, `nvptx64-nvidia-cuda`, `amdgcn-amd-amdhsa`, and
`native_cpu` triples respectively. Each build target should be separated with
a semicolon. This parameter is set to just `spir` by default. A test can be
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be set by default to all the available backends configured in the SYCL toolchain used. Not sure if that would be a doc-only change or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, this would require extra non-doc changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a bit on build target autodetection from #17141

in the current lit configuration.

When executing the test in `build-only`, all `RUN:` lines that do not have a
run expansion will execute.
Copy link
Contributor

Choose a reason for hiding this comment

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

including {run-aux} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, the point of %{run-aux} is to be able to switch over a line from running at the build stage, to running at the run stage.

* `UNSUPPORTED: !sg-32`: this would be supported. `sg-32` is evaluated as
unknown, and the negation of unknown is also unknown.

#### Common Issues with separate build and run
Copy link
Contributor

Choose a reason for hiding this comment

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

It is maybe unfair to ask, since this part of the doc is pre-existing. But we have this instruction
"Tests that build and execute multiple binaries need to be written such that the output of each compilation has a different name"
and I'd love to see an example what is meant by the solution. "each compilation has a different name".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I added an extra sentence with an example.

Also if you wanted more real examples the changes in #15631, are exactly what this is describing.

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

nits

@ayylol
Copy link
Contributor Author

ayylol commented Mar 4, 2025

nits

Ok, latest commit should address those. I also added a couple more examples to show how the triple selection works with regards to require statements.

@ayylol
Copy link
Contributor Author

ayylol commented Mar 5, 2025

@intel/llvm-gatekeepers this is ready to merge

@sarnex sarnex merged commit 29ea7a6 into intel:sycl Mar 5, 2025
2 checks passed
@ayylol ayylol deleted the e2e-docs branch March 5, 2025 21:15
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.

5 participants