Skip to content

Commit fe9e0ba

Browse files
[syclcompat][E2E] Skip case in math_vectorized_isgreater_test if fp16 unsupported (#14596)
The second test case in sycl/test-e2e/syclcompat/math/math_vectorized_isgreater_test.cpp uses vector of sycl::half, which requires devices to support aspect::fp16. This commit makes the test skip this case if the device does not support the aspect. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent e51002c commit fe9e0ba

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sycl/test-e2e/syclcompat/math/math_vectorized_isgreater_test.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ void test_vec_gt_2() {
131131
syclcompat::device_ext &dev_ct1 = syclcompat::get_current_device();
132132
sycl::queue *q_ct1 = dev_ct1.default_queue();
133133

134+
// This test uses vector of sycl::half, which requires support for fp16 on
135+
// the corresponding device.
136+
if (!dev_ct1.has(sycl::aspect::fp16)) {
137+
std::cout
138+
<< "Test case skipped as the device does not support aspect::fp16."
139+
<< std::endl;
140+
return;
141+
}
142+
134143
const unsigned int num_data = 7;
135144
unsigned int mem_size = sizeof(unsigned int) * num_data;
136145

0 commit comments

Comments
 (0)