Skip to content

Commit e1db858

Browse files
dongkyunahn-intelbb-sycl
authored andcommitted
[ESIMD] Size correction for array containing result values (intel#913)
* [ESIMD] Size correction for array containing 'gathered rgba' values
1 parent 6a857fa commit e1db858

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

SYCL/ESIMD/api/esimd_pack_unpack_mask.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
1010
<<<<<<< HEAD
11+
<<<<<<< HEAD
1112
=======
1213
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
1314
// XFAIL: esimd_emulator
@@ -17,6 +18,8 @@
1718
// TODO: fails on OpenCL - https://github.com/intel/llvm-test-suite/issues/901
1819
// UNSUPPORTED: opencl
1920
>>>>>>> 05909cd65 (Disable esimd_pack_unpack_mask test on OpenCL (#902))
21+
=======
22+
>>>>>>> e3ff34842 ([ESIMD] Size correction for array containing result values (#913))
2023
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
2124
// RUN: %GPU_RUN_PLACEHOLDER %t.out
2225
//
@@ -105,6 +108,7 @@ bool test_impl(queue q, const char *title, InitF init_f) {
105108
}
106109
}
107110
for (unsigned i = N; i < MAX_N; ++i) {
111+
<<<<<<< HEAD
108112
<<<<<<< HEAD
109113
if (res_unpacked[i] != 0) {
110114
++err_cnt;
@@ -116,6 +120,12 @@ bool test_impl(queue q, const char *title, InitF init_f) {
116120
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
117121
<< test_data[i] << std::dec << "\n";
118122
>>>>>>> 3c06ec209 ([ESIMD] Add smoke test for pack_mask/unpack_mask APIs. (#826))
123+
=======
124+
if (res_unpacked[i] != 0) {
125+
++err_cnt;
126+
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
127+
<< res_unpacked[i] << std::dec << " in unpacked result\n";
128+
>>>>>>> e3ff34842 ([ESIMD] Size correction for array containing result values (#913))
119129
}
120130
}
121131
std::cout << (err_cnt > 0 ? " FAILED\n" : " Passed\n");

SYCL/ESIMD/api/esimd_rgba_smoke.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,22 @@ template <class, int, int> class TestID;
9393
template <rgba_channel_mask ChMask, unsigned NPixels, class T>
9494
bool test_impl(queue q) {
9595
constexpr unsigned NOnChs = get_num_channels_enabled(ChMask);
96+
<<<<<<< HEAD
9697
<<<<<<< HEAD
9798
const unsigned Size = NPixels * NAllChs;
9899
=======
99100
unsigned SizeIn = NPixels * NAllChs;
100101
unsigned SizeOut = NPixels * NOnChs;
101102
>>>>>>> 5ed4bac7d ([ESIMD] Add gather/scatter_rgba smoke test, can be used as an example. (#835))
103+
=======
104+
const unsigned Size = NPixels * NAllChs;
105+
>>>>>>> e3ff34842 ([ESIMD] Size correction for array containing result values (#913))
102106

103107
std::cout << "Testing mask=";
104108
print_mask(ChMask);
105109
std::cout << ", T=" << typeid(T).name() << ", NPixels=" << NPixels << "\n";
106110

111+
<<<<<<< HEAD
107112
<<<<<<< HEAD
108113
T *A = malloc_shared<T>(Size, q);
109114
T *B = malloc_shared<T>(Size, q);
@@ -113,6 +118,11 @@ bool test_impl(queue q) {
113118
T *B = malloc_shared<T>(SizeOut, q);
114119
T *C = malloc_shared<T>(SizeOut, q);
115120
>>>>>>> 5ed4bac7d ([ESIMD] Add gather/scatter_rgba smoke test, can be used as an example. (#835))
121+
=======
122+
T *A = malloc_shared<T>(Size, q);
123+
T *B = malloc_shared<T>(Size, q);
124+
T *C = malloc_shared<T>(Size, q);
125+
>>>>>>> e3ff34842 ([ESIMD] Size correction for array containing result values (#913))
116126

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

0 commit comments

Comments
 (0)