Skip to content

Commit edffe2f

Browse files
Add "test dpcpp toolchain" section
1 parent 01c5b92 commit edffe2f

File tree

1 file changed

+58
-21
lines changed

1 file changed

+58
-21
lines changed

CONTRIBUTING.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,64 @@ see [ABI Policy Guide](sycl/doc/ABIPolicyGuide.md) for more information.
5454
- Run regression tests -
5555
[instructions](sycl/doc/GetStartedGuide.md#test-dpc-toolchain).
5656

57-
**Guidelines for adding Clang FE tests**:
58-
- Use `sycl::` namespace instead of `cl::sycl::`
59-
60-
- Include sycl mock headers as system headers.
61-
Example: `-internal-isystem %S/Inputs`
62-
`#include "sycl.hpp"`
63-
64-
- Use SYCL functions for invoking kernels from the mock header `(single_task, parallel_for, parallel_for_work_group)`
65-
Example:
66-
```bash
67-
`#include "Inputs/sycl.hpp"`
68-
sycl::queue q;
69-
q.submit([&](cl::sycl::handler &h) {
70-
h.single_task( { //code });
71-
});
72-
```
73-
74-
- Add a helpful comment describing what the test does at the beginning and other comments throughout the test as necessary.
75-
76-
- Try to follow descriptive naming convention for variables, functions as much as possible.
77-
Please refer [LLVM naming convention](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)
57+
### Test DPC++ toolchain
58+
59+
Every product change should be accompanied with corresponding test modification
60+
(adding new test(s), extending, removing or modifying existing test(s)).
61+
62+
There are 3 types of tests which are used for DPC++ toolchain validation:
63+
* DPC++ in-tree LIT tests including [check-llvm](../../llvm/test),
64+
[check-clang](../../clang/test), [check-llvm-spirv](../../llvm-spirv/test) and
65+
[check-sycl](../../sycl/test) targets stored in this repository. These tests
66+
should not have hardware (e.g. GPU, FPGA, etc.) or external software
67+
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
68+
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
69+
However, the tests for a feature under active development requiring atomic
70+
change for tests and product can be put to
71+
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
72+
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
73+
the feature is stabilized.
74+
75+
**Guidelines for adding DPC++ in-tree LIT tests (DPC++ Clang FE tests)**:
76+
- Use `sycl::` namespace instead of `cl::sycl::`
77+
78+
- Include sycl mock headers as system headers.
79+
Example: `-internal-isystem %S/Inputs`
80+
`#include "sycl.hpp"`
81+
82+
- Use SYCL functions for invoking kernels from the mock header `(single_task, parallel_for, parallel_for_work_group)`
83+
Example:
84+
```bash
85+
`#include "Inputs/sycl.hpp"`
86+
sycl::queue q;
87+
q.submit([&](cl::sycl::handler &h) {
88+
h.single_task( { //code });
89+
});
90+
```
91+
92+
- Add a helpful comment describing what the test does at the beginning and other comments throughout the test as necessary.
93+
94+
- Try to follow descriptive naming convention for variables, functions as much as possible.
95+
Please refer [LLVM naming convention](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)
96+
97+
* DPC++ end-to-end (E2E) tests which are extension to
98+
[LLVM\* test suite](https://github.com/intel/llvm-test-suite/tree/intel/SYCL).
99+
A test which requires full stack including backend runtimes (e.g. OpenCL,
100+
Level Zero or CUDA) should be put to DPC++ E2E test suite following
101+
[CONTRIBUTING](https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md).
102+
103+
* SYCL-CTS are official
104+
[Khronos\* SYCL\* conformance tests](https://github.com/KhronosGroup/SYCL-CTS).
105+
They verify SYCL specification compatibility. All implementation details or
106+
extensions are out of scope for the tests. If SYCL specification has changed
107+
(SYCL CTS tests conflict with recent version of SYCL specification) or change
108+
is required in the way the tests are built with DPC++ compiler (defined in
109+
[FindIntel_SYCL](https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-1.2.1/master/cmake/FindIntel_SYCL.cmake))
110+
pull request should be created under
111+
[KhronosGroup/SYCL-CTS](https://github.com/KhronosGroup/SYCL-CTS) with required
112+
patch.
113+
114+
78115
79116
### Commit message
80117

0 commit comments

Comments
 (0)