Skip to content

Commit 85b9f16

Browse files
[ESIMD] Size correction for array containing result values (intel/llvm-test-suite#913)
* [ESIMD] Size correction for array containing 'gathered rgba' values
1 parent e04215a commit 85b9f16

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

SYCL/ESIMD/api/esimd_pack_unpack_mask.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
11-
// XFAIL: esimd_emulator
12-
// TODO: fails on OpenCL - https://github.com/intel/llvm-test-suite/issues/901
13-
// UNSUPPORTED: opencl
1410
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
1511
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1612
//
@@ -81,10 +77,10 @@ bool test_impl(queue q, const char *title, InitF init_f) {
8177
}
8278
}
8379
for (unsigned i = N; i < MAX_N; ++i) {
84-
if (test_data[i] != 0) {
80+
if (res_unpacked[i] != 0) {
8581
++err_cnt;
8682
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
87-
<< test_data[i] << std::dec << "\n";
83+
<< res_unpacked[i] << std::dec << " in unpacked result\n";
8884
}
8985
}
9086
std::cout << (err_cnt > 0 ? " FAILED\n" : " Passed\n");

SYCL/ESIMD/api/esimd_rgba_smoke.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,15 @@ template <class, int, int> class TestID;
6969
template <rgba_channel_mask ChMask, unsigned NPixels, class T>
7070
bool test_impl(queue q) {
7171
constexpr unsigned NOnChs = get_num_channels_enabled(ChMask);
72-
unsigned SizeIn = NPixels * NAllChs;
73-
unsigned SizeOut = NPixels * NOnChs;
72+
const unsigned Size = NPixels * NAllChs;
7473

7574
std::cout << "Testing mask=";
7675
print_mask(ChMask);
7776
std::cout << ", T=" << typeid(T).name() << ", NPixels=" << NPixels << "\n";
7877

79-
T *A = malloc_shared<T>(SizeIn, q);
80-
T *B = malloc_shared<T>(SizeOut, q);
81-
T *C = malloc_shared<T>(SizeOut, q);
78+
T *A = malloc_shared<T>(Size, q);
79+
T *B = malloc_shared<T>(Size, q);
80+
T *C = malloc_shared<T>(Size, q);
8281

8382
for (unsigned p = 0; p < NPixels; ++p) {
8483
char ch_names[] = {'R', 'G', 'B', 'A'};

0 commit comments

Comments
 (0)