Skip to content

Commit 541289e

Browse files
kbobrovsbb-sycl
authored andcommitted
[ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (intel#826)
* [ESIMD] Add smoke test for pack_mask/unpack_mask APIs. Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 615e3f3 commit 541289e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

SYCL/ESIMD/api/esimd_pack_unpack_mask.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10+
<<<<<<< HEAD
11+
=======
12+
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
13+
// XFAIL: esimd_emulator
14+
>>>>>>> 3c06ec209 ([ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (#826))
1015
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
1116
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1217
//
@@ -15,13 +20,22 @@
1520
#include "../esimd_test_utils.hpp"
1621

1722
#include <CL/sycl.hpp>
23+
<<<<<<< HEAD
1824
#include <sycl/ext/intel/esimd.hpp>
25+
=======
26+
#include <sycl/ext/intel/experimental/esimd.hpp>
27+
>>>>>>> 3c06ec209 ([ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (#826))
1928

2029
#include <iostream>
2130

2231
using namespace cl::sycl;
32+
<<<<<<< HEAD
2333
using namespace sycl::ext::intel;
2434
using namespace sycl::ext::intel::esimd;
35+
=======
36+
using namespace sycl::ext::intel::experimental;
37+
using namespace sycl::ext::intel::experimental::esimd;
38+
>>>>>>> 3c06ec209 ([ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (#826))
2539

2640
template <int, int> struct test_id;
2741
using MaskRawElemT = typename simd_mask<1>::raw_element_type;
@@ -77,10 +91,17 @@ bool test_impl(queue q, const char *title, InitF init_f) {
7791
}
7892
}
7993
for (unsigned i = N; i < MAX_N; ++i) {
94+
<<<<<<< HEAD
8095
if (res_unpacked[i] != 0) {
8196
++err_cnt;
8297
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
8398
<< res_unpacked[i] << std::dec << " in unpacked result\n";
99+
=======
100+
if (test_data[i] != 0) {
101+
++err_cnt;
102+
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
103+
<< test_data[i] << std::dec << "\n";
104+
>>>>>>> 3c06ec209 ([ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (#826))
84105
}
85106
}
86107
std::cout << (err_cnt > 0 ? " FAILED\n" : " Passed\n");

0 commit comments

Comments
 (0)