Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.44 KB

header-file.asciidoc

File metadata and controls

35 lines (20 loc) · 1.44 KB

Test plan for header files and namespaces

This is a test plan for the header files and namespaces as described in SYCL 2020 Section 4.3.

Estimated development time is one day.

1. Testing scope

1.1. Backend coverage

All the tests described below are performed for any SYCL backend.

1.2. Device coverage

All the tests described below are performed only on the default device that is selected on the CTS command line.

2. Tests

The following combinations for namespaces and header files exist:

  • Header file sycl/sycl.hpp and namespace ::sycl.

  • Header file CL/sycl.hpp and namespace ::cl::sycl.

Two versions are proposed:

2.1. Version 1

Create a simple test program. For instance, the example program of listing in Section 3.15 "Example SYCL application" of the SYCL 2020 specification. Check if the program compiles when configured for both combinations.

2.2. Version 2

Check if the entire CTS successfully compiles when configured both combinations.

This can be done by creating a configurable header file (e.g. sycl_cts.hpp.in) with defines SYCL_HEADER and SYCL_NAMEPACE, and #include <SYCL_HEADER>. For all existing tests, replace #include <sycl/sycl.hpp> with #include "sycl_cts.hpp" and sycl:: with SYCL_NAMESPACE::. CMake’s try_compile can be used to see if the tests compile. There should be a CTS option to disable this behavior and only compile and run the tests with sycl/sycl.hpp and ::sycl.