Skip to content

[SYCL][DOC] Document test-related processes #2760

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 10 commits into from
Nov 13, 2020
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ is strongly encouraged that you submit the patch to https://llvm.org/ directly.
See [LLVM contribution guidelines](https://llvm.org/docs/Contributing.html)
for more information.

**NB**: A change in compiler and runtime should be accompanied with
corresponding test changes.
See [Test DPC++ toolchain](sycl/doc/GetStartedGuide.md#test-dpc-toolchain)
section of Get Started guide for more information.

**Note (October, 2020)**: DPC++ runtime and compiler ABI is currently in frozen
state. This means that no ABI-breaking changes will be accepted by default.
Project maintainers may still approve breaking changes in some cases. Please,
Expand Down
40 changes: 39 additions & 1 deletion sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,40 @@ command:

### Test DPC++ toolchain

#### Run regression tests
Every product change should be accompanied with corresponding test modification
(adding new test(s), extending, removing or modifying existing test(s)).

There are 3 types of tests which are used for DPC++ toolchain validation:
* DPC++ in-tree LIT tests including [check-llvm](../../llvm/test),
[check-clang](../../clang/test), [check-llvm-spirv](../../llvm-spirv/test) and
[check-sycl](../../sycl/test) targets stored in this repository. These tests
should not have hardware (e.g. GPU, FPGA, etc.) or external software
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
However, the tests for a feature under active development requiring atomic
change for tests and product can be put to
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
the feature is stabilized.

* DPC++ end-to-end (E2E) tests which are extension to
[LLVM\* test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL).
A test which requires full stack including backend runtimes (e.g. OpenCL,
Level Zero or CUDA) should be put to DPC++ E2E test suite following
[CONTRIBUTING](https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md).

* SYCL-CTS are official
[Khronos\* SYCL\* conformance tests](https://github.com/KhronosGroup/SYCL-CTS).
They verify SYCL specification compatibility. All implementation details or
extensions are out of scope for the tests. If SYCL specification has changed
(SYCL CTS tests conflict with recent version of SYCL specification) or change
is required in the way the tests are built with DPC++ compiler (defined in
[FindIntel_SYCL](https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-1.2.1/master/cmake/FindIntel_SYCL.cmake))
pull request should be created under
[KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) with required
patch.

#### Run in-tree LIT tests

To verify that built DPC++ toolchain is working correctly, run:

Expand All @@ -302,6 +335,11 @@ skipped.
If CUDA support has been built, it is tested only if there are CUDA devices
available.

#### Run DPC++ E2E test suite

Follow instructions from the link below to build and run tests:
[README](https://github.com/intel/llvm-test-suite/tree/intel/SYCL#execution)

#### Run Khronos\* SYCL\* conformance test suite (optional)

Khronos\* SYCL\* conformance test suite (CTS) is intended to validate
Expand Down
13 changes: 13 additions & 0 deletions sycl/test/on-device/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DPC++ end-to-end tests for features under development

We require to have in-tree LIT tests independent from HW (e.g. GPU,
FPGA, etc) and external software (e.g OpenCL, Level Zero, CUDA runtimes, etc).

However, it might be helpful to have E2E tests stored in-tree for features
under active development if atomic change is required for the test and product.
This directory can contain such tests temporarily.

It is developer responsibility to move the tests from this directory to
[DPC++ E2E test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL)
or [KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) once the
feature is stabilized.