This is a test plan for the supported backend interoperability APIs for the CUDA backend described in the CUDA backend specification.
All of the tests described in this plan are performed only for SYCL implementations which support the CUDA backend.
All of the tests described in this plan are performed only for Nvidia GPU devices available under the CUDA backend.
The tests described in this plan are performed for all supported types for the type they are associated with.
When T
is the data type for accessor
or local_accessor
it is tested for
the following types:
-
char
-
signed char
-
unsigned char
-
short int
-
unsigned short int
-
int
-
unsigned int
-
long int
-
unsigned long int
-
long long int
-
unsigned long long int
-
float
-
double
-
bool
-
std::byte
-
std::int8_t
-
std::int16_t
-
std::int32_t
-
std::int64_t
-
std::uint8_t
-
std::uint16_t
-
std::uint32_t
-
std::uint64_t
-
std::size_t
-
vec<T, int dim>
whereT
is each of the scalar types listed above except forbool
anddim
is1
,2
,3
,4
,8
, and16
. -
marray<T, size_t dim>
whereT
is each of the scalar types listed above anddim
is1
,2
,5
, and10
. -
A user-defined struct with several scalar member variables, no constructor, destructor or member functions.
-
A user-defined class with several scalar member variables and a user-defined default constructor.
-
A user-defined class with several scalar member variables, a deleted default constructor, and a user-defined (non-default) constructor.
When T
is the data type for unsampled_image_accessor
or
sampled_image_accessor
it is tested for the following types:
-
sycl::int4
-
sycl::uint4
-
sycl::float4
-
sycl::half4
-
Check that the macro
SYCL_BACKEND_CUDA
is defined. -
Check that the
sycl::backend
enum has the membercuda
.
All of the tests in this section are run within SYCL application scope.
-
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::device>
is available and resolves to an alias ofCUdevice
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::context>
is available and resolves to an alias ofCUcontext
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::queue>
is available and resolves to an alias ofCUstream
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::event>
is available and resolves to an alias ofCUevent
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::device>
is available and resolves to an alias ofCUdevice
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::context>
is available and resolves to an alias ofstd::vector<CUcontext>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::queue>
is available and resolves to an alias ofCUstream
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::event>
is available and resolves to an alias ofCUevent
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::buffer>
is available and resolves to an alias ofvoid *
.
-
Check that the
sycl::make_device
template function specialization forsycl::backend::cuda
is defined and can take a validCUdevice
and returns a validsycl::device
. -
Check that the
sycl::make_context
template function specialization forsycl::backend::cuda
is defined and can take a validCUcontext
and returns a validsycl::context
. -
Check that the
sycl::make_queue
template function specialization forsycl::backend::cuda
is defined and can take a validCUstream
and returns a validsycl::queue
. -
Check that the
sycl::make_event
template function specialization forsycl::backend::cuda
is defined and can take a validCUevent
and returns a validsycl::event
.
-
Check that the
sycl::get_native
template function specialization forsycl::backend::cuda
andsycl::device
is defined and can take a validsycl::device
and returns a validCUdevice
. -
Check that the
sycl::get_native
template function specialization forsycl::backend::cuda
andsycl::context
is defined and can take a validsycl::context
and returns a validstd::vector<CUcontext>
. -
Check that the
sycl::get_native
template function specialization forsycl::backend::cuda
andsycl::queue
is defined and can take a validsycl::queue
and returns a validCUstream
. -
Check that the
sycl::get_native
template function specialization forsycl::backend::cuda
andsycl::event
is defined and can take a validsycl::event
and returns a validCUevent
.
-
Check that the
sycl::interop_handle::get_native_device
template member function specialization forsycl::backend::cuda
is defined and returns a validCUdevice
. -
Check that the
sycl::interop_handle::get_native_queue
template member function specialization forsycl::backend::cuda
is defined and returns a validCUstream
. -
Check that the
sycl::interop_handle::get_native_context
template member function specialization forsycl::backend::cuda
is defined and returns a validstd::vector<CUcontext>
. -
Check that the
sycl::interop_handle::get_native_mem
template member function specialization forsycl::backend::cuda
andsycl::buffer
is defined and returns a validvoid *
.
All of the tests in this section are run within SYCL kernel function scope.
-
Check that the
sycl::cuda::texture
template class is defined. -
Check that the
sycl::cuda::surface
template class is defined.
The following tests are not run for each of the types defined in Section 1.3.
-
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::device>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::constant_buffer>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::local>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sycl::local_accessor<T, Dims>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sampled_image_accessor<T, 1, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 1>
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sampled_image_accessor<T, 2, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 2>
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, sampled_image_accessor<T, 3, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 3>
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, unsampled_image_accessor<T, 1, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 1>
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, unsampled_image_accessor<T, 2, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 2>
. -
Check that the
sycl::backend_input_t<sycl::backend::cuda, unsampled_image_accessor<T, 3, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 3>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::device>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::constant_buffer>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::accessor<T, Dims, Mode, target::local>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sycl::local_accessor<T, Dims>>
is available and resolves to an alias ofT *
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sampled_image_accessor<T, 1, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 1>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sampled_image_accessor<T, 2, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 2>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, sampled_image_accessor<T, 3, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::texture<T, 3>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, unsampled_image_accessor<T, 1, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 1>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, unsampled_image_accessor<T, 2, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 2>
. -
Check that the
sycl::backend_return_t<sycl::backend::cuda, unsampled_image_accessor<T, 3, Mode, image_target::device>>
is available and resolves to an alias ofsycl::cuda::surface<T, 3>
.
The following tests are not run for each of the types defined in Section 1.3.
-
Check that a CUDA function can be declared using
SYCL_EXTERNAL
. -
Check that a CUDA function can be called with the backend interop type
T *
converted from anaccessor
orlocal_accessor
. -
Check that a CUDA function can be called with the backend interop type
texture
, converted from asampled_image_accessor
. -
Check that a CUDA function can be called with the backend interop type
surface
, converted from anunsampled_image_accessor
.