Skip to content

Commit 83e7ada

Browse files
[SYCL][ESIMD] Check requirements in ctor_broadcast (intel#1401)
ctor_broadcast_fp_extra uses fp16 and fp64 but does not check for the requirement before running the kernels on the device. This commit adds the requirement check to ctor_broadcast. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 4b9e726 commit 83e7ada

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ class run_test {
146146
bool run_verification(sycl::queue &queue, SrcT ref_value,
147147
const std::string &src_data_type,
148148
const std::string &dst_data_type) {
149+
bool passed = true;
150+
151+
auto device = queue.get_device();
152+
if (should_skip_test_with<SrcT>(device) ||
153+
should_skip_test_with<DstT>(device))
154+
return passed;
155+
149156
shared_vector<DstT> result(NumElems, shared_allocator<DstT>(queue));
150157
shared_vector<SrcT> shared_ref_data(1, shared_allocator<SrcT>(queue));
151158
shared_ref_data[0] = ref_value;
@@ -164,7 +171,6 @@ class run_test {
164171
queue.wait_and_throw();
165172

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

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
1515
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1616
//
17-
// XFAIL: windows
18-
// TODO: This test currently fails on windows. Remove above XFAIL when fixed.
19-
//
2017
// Test for simd broadcast constructor.
2118
// This test uses fp extra data types, sizes and different simd constructor
2219
// invocation contexts.

0 commit comments

Comments
 (0)