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

[ESIMD] Size correction for array containing result values #913

Merged
merged 4 commits into from
Mar 11, 2022
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: 2 additions & 6 deletions SYCL/ESIMD/api/esimd_pack_unpack_mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
//===----------------------------------------------------------------------===//
// REQUIRES: gpu
// UNSUPPORTED: cuda || hip
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
// XFAIL: esimd_emulator
// TODO: fails on OpenCL - https://github.com/intel/llvm-test-suite/issues/901
// UNSUPPORTED: opencl
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
//
Expand Down Expand Up @@ -81,10 +77,10 @@ bool test_impl(queue q, const char *title, InitF init_f) {
}
}
for (unsigned i = N; i < MAX_N; ++i) {
if (test_data[i] != 0) {
if (res_unpacked[i] != 0) {
++err_cnt;
std::cout << " ERROR: non-zero lane " << i << ": 0x" << std::hex
<< test_data[i] << std::dec << "\n";
<< res_unpacked[i] << std::dec << " in unpacked result\n";
}
}
std::cout << (err_cnt > 0 ? " FAILED\n" : " Passed\n");
Expand Down
9 changes: 4 additions & 5 deletions SYCL/ESIMD/api/esimd_rgba_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@ template <class, int, int> class TestID;
template <rgba_channel_mask ChMask, unsigned NPixels, class T>
bool test_impl(queue q) {
constexpr unsigned NOnChs = get_num_channels_enabled(ChMask);
unsigned SizeIn = NPixels * NAllChs;
unsigned SizeOut = NPixels * NOnChs;
const unsigned Size = NPixels * NAllChs;

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

T *A = malloc_shared<T>(SizeIn, q);
T *B = malloc_shared<T>(SizeOut, q);
T *C = malloc_shared<T>(SizeOut, q);
T *A = malloc_shared<T>(Size, q);
T *B = malloc_shared<T>(Size, q);
T *C = malloc_shared<T>(Size, q);

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