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

[SYCL][ESIMD] Check requirements in ctor_broadcast #1401

Merged
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
8 changes: 7 additions & 1 deletion SYCL/ESIMD/api/functional/ctors/ctor_broadcast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ class run_test {
bool run_verification(sycl::queue &queue, SrcT ref_value,
const std::string &src_data_type,
const std::string &dst_data_type) {
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(1, shared_allocator<SrcT>(queue));
shared_ref_data[0] = ref_value;
Expand All @@ -164,7 +171,6 @@ class run_test {
queue.wait_and_throw();

const DstT expected = static_cast<DstT>(ref_value);
bool passed = true;
for (size_t i = 0; i < result.size(); ++i) {
const DstT &retrieved = result[i];

Expand Down
3 changes: 0 additions & 3 deletions SYCL/ESIMD/api/functional/ctors/ctor_broadcast_fp_extra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
//
// XFAIL: windows
// TODO: This test currently fails on windows. Remove above XFAIL when fixed.
//
// Test for simd broadcast constructor.
// This test uses fp extra data types, sizes and different simd constructor
// invocation contexts.
Expand Down