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

Commit 57f9755

Browse files
[SYCL] Skip ESIMD/api/functional tests if HW has no support (#1262)
1 parent 91e3d0e commit 57f9755

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

SYCL/ESIMD/api/functional/ctors/ctor_converting.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ class run_test {
161161

162162
bool passed = true;
163163

164+
auto device = queue.get_device();
165+
if (should_skip_test_with<SrcT>(device) ||
166+
should_skip_test_with<DstT>(device))
167+
return passed;
168+
164169
shared_vector<DstT> result(NumElems, shared_allocator<DstT>(queue));
165170
shared_vector<SrcT> shared_ref_data(ref_data.begin(), ref_data.end(),
166171
shared_allocator<SrcT>(queue));

SYCL/ESIMD/api/functional/ctors/ctor_load_acc.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ class run_test {
171171
bool passed = true;
172172
log::trace<TestDescriptionT>(std::forward<TestDescriptionArgsT>(args)...);
173173

174+
if (should_skip_test_with<DataT>(queue.get_device()))
175+
return passed;
176+
174177
const std::vector<DataT> ref_data = generate_ref_data<DataT, VecSize>();
175178

176179
if constexpr (VecSize == 1) {

SYCL/ESIMD/api/functional/ctors/ctor_load_usm.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ class run_test {
9696
bool passed = true;
9797
log::trace<TestDescriptionT>(data_type, alignment_name);
9898

99+
if (should_skip_test_with<DataT>(queue.get_device()))
100+
return passed;
101+
99102
const std::vector<DataT> ref_data = generate_ref_data<DataT, NumElems>();
100103

101104
// If current number of elements is equal to one, then run test with each

SYCL/ESIMD/api/functional/functions/functions_select_2d.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ class run_test {
9595
"Value that used for increase ref data for fill plus simd "
9696
"size should be less than char max value.");
9797

98+
if (should_skip_test_with<DataT>(queue.get_device()))
99+
return passed;
100+
98101
shared_allocator<DataT> allocator(queue);
99102
shared_vector<DataT> result(NumElems, allocator);
100103
shared_vector<DataT> initial_ref_data(NumElems, allocator);

SYCL/ESIMD/api/functional/operators/operator_decrement_and_increment.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ class run_test {
173173
public:
174174
bool operator()(sycl::queue &queue, const std::string &data_type) {
175175
bool passed = true;
176+
177+
if (should_skip_test_with<DataT>(queue.get_device()))
178+
return passed;
179+
176180
std::vector<DataT> ref_data =
177181
IsAccuracyTestT::template generate_input_data<DataT, NumElems,
178182
TestCaseT>();

0 commit comments

Comments
 (0)