|
| 1 | +:sectnums: |
| 2 | +:xrefstyle: short |
| 3 | + |
| 4 | += Test plan for SYCL extension KHR work item queries |
| 5 | + |
| 6 | +This is a test plan for an extension that defines a new interface for groups |
| 7 | +described in |
| 8 | +https://github.com/KhronosGroup/SYCL-Docs/blob/f972f91ef7676c1423eb8402974e1682411903eb/adoc/extensions/sycl_khr_work_item_queries.adoc[sycl_khr_work_item_queries]. |
| 9 | + |
| 10 | +== Testing scope |
| 11 | + |
| 12 | +=== Device coverage |
| 13 | + |
| 14 | +All of the tests described below are performed only on the default device that |
| 15 | +is selected on the CTS command line. |
| 16 | + |
| 17 | +=== Feature test macro |
| 18 | + |
| 19 | +The tests should statically check that the `SYCL_KHR_WORK_ITEM_QUERIES` macro is |
| 20 | +defined. |
| 21 | + |
| 22 | +== Tests |
| 23 | + |
| 24 | +The test cases should test the interface of each of the free functions defined |
| 25 | +in the extension: |
| 26 | + |
| 27 | +* `sycl::khr::this_nd_item` |
| 28 | +* `sycl::khr::this_group` |
| 29 | +* `sycl::khr::work_item<sycl::khr::sub_group>` |
| 30 | + |
| 31 | +Each test case should run ND-range kernels with `Dimensions` equal to 1, 2, |
| 32 | +and 3. |
| 33 | + |
| 34 | +=== Test description |
| 35 | + |
| 36 | +In the following tests, `Dimensions` is the number of dimensions of the kernel |
| 37 | +being tested. Equality checks in the kernels should set a value in a buffer or |
| 38 | +USM allocation that is then checked on the host. |
| 39 | + |
| 40 | +==== `sycl::khr::this_nd_item` function |
| 41 | + |
| 42 | +In the kernel scope, the test should call |
| 43 | +`sycl::khr::this_nd_item<Dimensions>()` to get an `nd_item<Dimensions>` and |
| 44 | +check that it's equal to the one passed as a parameter to the kernel. |
| 45 | + |
| 46 | +==== `sycl::khr::this_group` function |
| 47 | + |
| 48 | +In the kernel scope, the test should call `sycl::khr::this_group<Dimensions>()` |
| 49 | +to get an `nd_item<Dimensions>` and check that it's equal to the one obtained |
| 50 | +from the kernel's `nd_item` using the `nd_item::get_group` member function. |
| 51 | + |
| 52 | +==== `sycl::khr::this_sub_group` class |
| 53 | + |
| 54 | +In the kernel scope, the test should use function to get a `sub_group` and check |
| 55 | +that it's equal to the one obtained from the kernel's `nd_item` using the |
| 56 | +`nd_item::get_sub_group` member function. |
| 57 | + |
0 commit comments