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

[SYCL] Skip ESIMD/api/functional tests if HW has no support #1262

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions SYCL/ESIMD/api/functional/ctors/ctor_converting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ class run_test {

bool passed = true;

auto device = queue.get_device();
if (should_skip_test_with<SrcT>(device) ||
should_skip_test_with<DstT>(device))
return passed;

shared_vector<DstT> result(NumElems, shared_allocator<DstT>(queue));
shared_vector<SrcT> shared_ref_data(ref_data.begin(), ref_data.end(),
shared_allocator<SrcT>(queue));
Expand Down
3 changes: 3 additions & 0 deletions SYCL/ESIMD/api/functional/ctors/ctor_load_acc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ class run_test {
bool passed = true;
log::trace<TestDescriptionT>(std::forward<TestDescriptionArgsT>(args)...);

if (should_skip_test_with<DataT>(queue.get_device()))
return passed;

const std::vector<DataT> ref_data = generate_ref_data<DataT, VecSize>();

if constexpr (VecSize == 1) {
Expand Down
3 changes: 3 additions & 0 deletions SYCL/ESIMD/api/functional/ctors/ctor_load_usm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ class run_test {
bool passed = true;
log::trace<TestDescriptionT>(data_type, alignment_name);

if (should_skip_test_with<DataT>(queue.get_device()))
return passed;

const std::vector<DataT> ref_data = generate_ref_data<DataT, NumElems>();

// If current number of elements is equal to one, then run test with each
Expand Down
3 changes: 3 additions & 0 deletions SYCL/ESIMD/api/functional/functions/functions_select_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class run_test {
"Value that used for increase ref data for fill plus simd "
"size should be less than char max value.");

if (should_skip_test_with<DataT>(queue.get_device()))
return passed;

shared_allocator<DataT> allocator(queue);
shared_vector<DataT> result(NumElems, allocator);
shared_vector<DataT> initial_ref_data(NumElems, allocator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ class run_test {
public:
bool operator()(sycl::queue &queue, const std::string &data_type) {
bool passed = true;

if (should_skip_test_with<DataT>(queue.get_device()))
return passed;

std::vector<DataT> ref_data =
IsAccuracyTestT::template generate_input_data<DataT, NumElems,
TestCaseT>();
Expand Down