This is a test plan for the for new constructors of class sycl::queue
described in SYCL 2020.
Tests intend to cover not covered constructors from 4.6.5.1. Queue interface that are not covered in https://github.com/KhronosGroup/SYCL-CTS/blob/main/tests/queue/queue_constructors.cpp
Create syclContext
that doesn’t encapsulate selected device. If no other root device is available for context creation, test case is skipped.
For following constructors use created syclContext
, selected device or cts_selector
, cts_async_handler
and check that synchronous exception with the errc::invalid
error code is thrown:
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const property_list& propList = {})
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const async_handler& asyncHandler, const property_list& propList = {})
Note: test without properties.
Use property in_order
with following constructors also using selected device, corresponding context, cts_selector
, cts_async_handler
and check that resulting queue member functions has_property<in_order>()
and is_in_order()
return true
:
-
queue(const property_list& propList = {})
-
queue(const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const DeviceSelector& deviceSelector, const property_list& propList = {})
-
queue(const DeviceSelector& deviceSelector, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const device& syclDevice, const property_list& propList = {})
-
queue(const device& syclDevice, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const property_list& propList = {})
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const async_handler& asyncHandler, const property_list& propList = {})
If device::has(sycl::aspect::usm_device_allocations)
is false
this part of test is skipped.
Submit two single_task
to queue - first with long loop and second that changes a usm
variable with device allocation.
In the first task check that after loop the variable is unchanged to verify that in_order
property adds the requirement that the SYCL queue provides in-order semantics.
If device::has(sycl::aspect::queue_profiling)
is false
these tests is skipped.
The same condition should also be added to existing tests for queue constructors with enable_profiling
property.
Use propList = {in_order, enable_profiling}
with following constructors also using selected device, corresponding context, cts_selector
, cts_async_handler
and check that resulting queue member finctions has_property<enable_profiling>()
, has_property<in_order>()
and is_in_order()
return true
:
-
queue(const property_list& propList = {})
-
queue(const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const DeviceSelector& deviceSelector, const property_list& propList = {})
-
queue(const DeviceSelector& deviceSelector, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const device& syclDevice, const property_list& propList = {})
-
queue(const device& syclDevice, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const property_list& propList = {})
-
queue(const context& syclContext, const DeviceSelector& deviceSelector, const async_handler& asyncHandler, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const property_list& propList = {})
-
queue(const context& syclContext, const device& syclDevice, const async_handler& asyncHandler, const property_list& propList = {})