|
| 1 | +# Test plan for [`sycl ext intel kernel queries`][spec-link] extension |
| 2 | + |
| 3 | +## Testing scope |
| 4 | + |
| 5 | +### Device coverage |
| 6 | + |
| 7 | +The unit tests should be launched on every supported device configuration we |
| 8 | +have. |
| 9 | + |
| 10 | +### Type coverage |
| 11 | + |
| 12 | +Each query is templated on a single template type argument `Param` |
| 13 | +with some queries being template overloads of each other. |
| 14 | +Each query has a restriction on the value of `Param` defined |
| 15 | +in the relevant section of the spec. |
| 16 | +Each `Param` defines a related sycl aspect that signals whether the device |
| 17 | +supports it. |
| 18 | + |
| 19 | +Param must be one of the following types defined in |
| 20 | +`sycl::ext::intel::info::kernel_device_specific` namespace: |
| 21 | +- `spill_memory_size` |
| 22 | + |
| 23 | +The tests should cover all of these types. |
| 24 | + |
| 25 | +## Tests |
| 26 | + |
| 27 | +### Unit tests |
| 28 | + |
| 29 | +#### Interface tests |
| 30 | + |
| 31 | +These tests are intended to check that all classes and methods defined by the |
| 32 | +extension have correct implementation, i.e.: right signatures, right return |
| 33 | +types, all necessary constraints are checked/enforced, etc. |
| 34 | + |
| 35 | +These tests should check the following: |
| 36 | + |
| 37 | +- that each query is not available when the template argument `Param` has |
| 38 | + a value different than the one in the spec. |
| 39 | +- that each query can be called with the appropriate value for `Param` and the |
| 40 | + appropriate argument types as defined by its signature. |
| 41 | +- the return types of all queries match the spec. |
| 42 | + |
| 43 | +Tests in this category may not perform some useful actions to exercise the |
| 44 | +extension functionality in full, but instead they are focused on making sure |
| 45 | +that all APIs are consistent with respect to other APIs. |
| 46 | + |
| 47 | +#### Check behavior in the case of unsupported aspects |
| 48 | + |
| 49 | +Verigy that a synchronous `exception` with the error code |
| 50 | +`errc::feature_not_supported` is thrown if an aspect is not supported by the |
| 51 | +device. |
| 52 | + |
| 53 | +[spec-link]: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/supported/sycl_ext_intel_kernel_queries.asciidoc |
0 commit comments