Skip to content

Commit ff90e06

Browse files
authored
[SYCL][DOC] Document test-related processes (#2760)
* Adding documentation for tests development
1 parent 071960f commit ff90e06

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ is strongly encouraged that you submit the patch to https://llvm.org/ directly.
2020
See [LLVM contribution guidelines](https://llvm.org/docs/Contributing.html)
2121
for more information.
2222

23+
**NB**: A change in compiler and runtime should be accompanied with
24+
corresponding test changes.
25+
See [Test DPC++ toolchain](sycl/doc/GetStartedGuide.md#test-dpc-toolchain)
26+
section of Get Started guide for more information.
27+
2328
**Note (October, 2020)**: DPC++ runtime and compiler ABI is currently in frozen
2429
state. This means that no ABI-breaking changes will be accepted by default.
2530
Project maintainers may still approve breaking changes in some cases. Please,

sycl/doc/GetStartedGuide.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,40 @@ command:
280280
281281
### Test DPC++ toolchain
282282
283-
#### Run regression tests
283+
Every product change should be accompanied with corresponding test modification
284+
(adding new test(s), extending, removing or modifying existing test(s)).
285+
286+
There are 3 types of tests which are used for DPC++ toolchain validation:
287+
* DPC++ in-tree LIT tests including [check-llvm](../../llvm/test),
288+
[check-clang](../../clang/test), [check-llvm-spirv](../../llvm-spirv/test) and
289+
[check-sycl](../../sycl/test) targets stored in this repository. These tests
290+
should not have hardware (e.g. GPU, FPGA, etc.) or external software
291+
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
292+
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
293+
However, the tests for a feature under active development requiring atomic
294+
change for tests and product can be put to
295+
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
296+
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
297+
the feature is stabilized.
298+
299+
* DPC++ end-to-end (E2E) tests which are extension to
300+
[LLVM\* test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL).
301+
A test which requires full stack including backend runtimes (e.g. OpenCL,
302+
Level Zero or CUDA) should be put to DPC++ E2E test suite following
303+
[CONTRIBUTING](https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md).
304+
305+
* SYCL-CTS are official
306+
[Khronos\* SYCL\* conformance tests](https://github.com/KhronosGroup/SYCL-CTS).
307+
They verify SYCL specification compatibility. All implementation details or
308+
extensions are out of scope for the tests. If SYCL specification has changed
309+
(SYCL CTS tests conflict with recent version of SYCL specification) or change
310+
is required in the way the tests are built with DPC++ compiler (defined in
311+
[FindIntel_SYCL](https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-1.2.1/master/cmake/FindIntel_SYCL.cmake))
312+
pull request should be created under
313+
[KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) with required
314+
patch.
315+
316+
#### Run in-tree LIT tests
284317
285318
To verify that built DPC++ toolchain is working correctly, run:
286319
@@ -302,6 +335,11 @@ skipped.
302335
If CUDA support has been built, it is tested only if there are CUDA devices
303336
available.
304337
338+
#### Run DPC++ E2E test suite
339+
340+
Follow instructions from the link below to build and run tests:
341+
[README](https://github.com/intel/llvm-test-suite/tree/intel/SYCL#execution)
342+
305343
#### Run Khronos\* SYCL\* conformance test suite (optional)
306344
307345
Khronos\* SYCL\* conformance test suite (CTS) is intended to validate

sycl/test/on-device/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# DPC++ end-to-end tests for features under development
2+
3+
We require to have in-tree LIT tests independent from HW (e.g. GPU,
4+
FPGA, etc) and external software (e.g OpenCL, Level Zero, CUDA runtimes, etc).
5+
6+
However, it might be helpful to have E2E tests stored in-tree for features
7+
under active development if atomic change is required for the test and product.
8+
This directory can contain such tests temporarily.
9+
10+
It is developer responsibility to move the tests from this directory to
11+
[DPC++ E2E test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL)
12+
or [KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) once the
13+
feature is stabilized.

0 commit comments

Comments
 (0)