Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 32fd77f

Browse files
committed
[SYCL][ESIMD] Add verification that device has fp16 and fp64 aspects
1 parent 3a6b647 commit 32fd77f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

SYCL/ESIMD/api/functional/ctors/ctor_vector_core.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ int main(int, char **) {
161161
sycl::queue queue(esimd_test::ESIMDSelector{},
162162
esimd_test::createExceptionHandler());
163163

164+
sycl::device device = queue.get_device();
165+
// verify aspect::fp16 due to using sycl::half data type
166+
// verify aspect::fp64 due to using double data type
167+
if (!device.is_host() && !device.has(sycl::aspect::fp16) &&
168+
!device.has(sycl::aspect::fp64)) {
169+
std::cout << "Test skipped\n";
170+
return 0;
171+
}
172+
164173
bool passed = true;
165174

166175
#ifdef SIMD_RUN_TEST_WITH_CHAR_TYPES

0 commit comments

Comments
 (0)