Skip to content

Commit 3a4da9f

Browse files
committed
[SYCL] Document test-related processes
1 parent f0cadb1 commit 3a4da9f

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-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 change.
25+
See [DPC++ test toolchain](sycl/doc/GetStartedGuide.md#test-dpc-toolchain)
26+
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: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,50 @@ command:
280280
281281
### Test DPC++ toolchain
282282
283-
#### Run regression tests
283+
There are 3 types of tests which are used for DPC++ toolchain validation:
284+
* DPC++ in-source LIT tests including [check-llvm](../../llvm/test),
285+
[check-clang](../../clang/test), [check-llvm-spirv](../../llvm-spirv/test) and
286+
[check-sycl](../../sycl/test) targets stored in this repository. These tests
287+
should be not have hardware or external software dependencies (e.g OpenCL,
288+
Level Zero, CUDA runtimes). All test which do not follow this approach should
289+
be moved to DPC++ end-to-end tests.
290+
291+
* DPC++ end-to-end (E2E) tests which are extension to
292+
[LLVM\* test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL).
293+
These tests cover full DPC++ stack including all dependencies (e.g. OpenCL,
294+
Level Zero, CUDA runtimes).
295+
296+
* SYCL-CTS are official [Khronos\* SYCL\* conformance tests](https://github.com/KhronosGroup/SYCL-CTS).
297+
They verify SYCL 1.2.1 specification compatibility. All implementation details
298+
or extensions are out of scope for the tests.
299+
300+
#### Contribution to DPC++ tests
301+
Every product change should be accompanied with corresponding test modification
302+
(adding new test(s), extending or modifying existing test(s)).
303+
304+
The test location is selected depending on test nature:
305+
306+
- A test which depends only on tools and libraries produced during build of
307+
the repository can be put to in-source LIT. Also the tests for a feature under
308+
active development requiring atomic change for tests and product can be put to
309+
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
310+
responsibility to move the tests to DPC++ E2E test suite once feature is
311+
stabilized.
312+
313+
- A test which requires full stack including backend runtimes (e.g. OpenCL,
314+
Level Zero or CUDA) should be put to DPC++ E2E test suite following
315+
[CONTRIBUTING](https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md).
316+
317+
- If SYCL specification has changed (SYCL CTS tests conflict with recent
318+
version of SYCL specification) or change is required in the way the tests are
319+
built with DPC++ compiler (defined in
320+
[FindIntel_SYCL](https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-1.2.1/master/cmake/FindIntel_SYCL.cmake))
321+
pull request should be created under
322+
[KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) with required
323+
patch.
324+
325+
326+
#### Run in-source LIT tests
284327
285328
To verify that built DPC++ toolchain is working correctly, run:
286329
@@ -302,6 +345,11 @@ skipped.
302345
If CUDA support has been built, it is tested only if there are CUDA devices
303346
available.
304347
348+
#### Run DPC++ E2E test suite
349+
350+
Follow instructions from the link below to build and run tests:
351+
[README](https://github.com/intel/llvm-test-suite/tree/intel/SYCL#execution)
352+
305353
#### Run Khronos\* SYCL\* conformance test suite (optional)
306354
307355
Khronos\* SYCL\* conformance test suite (CTS) is intended to validate

0 commit comments

Comments
 (0)