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

Commit 7f0ae77

Browse files
[SYCL][ESIMD][EMU] ESIMD test updates for esimd_emulator backend (#869)
* [SYCL][ESIMD][EMU] ESIMD test updates for esimd_emulator backend - Reducing number of iterations / Limiting matrix size in order to avoid timeout failure - Removing 'XFAIL' from passing tests - Required memory intrinsic implementations are supported in intel/llvm/sycl - Recovering XFAIL for 'SYCL/ESIMD/api/simd_subscript_operator.cpp' For unimplemented 'half' type
1 parent b838a72 commit 7f0ae77

28 files changed

+28
-46
lines changed

SYCL/ESIMD/BitonicSortK.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

@@ -602,6 +600,12 @@ int BitonicSort::Solve(uint32_t *pInputs, uint32_t *pOutputs, uint32_t size) {
602600
double kernel_times = 0;
603601
unsigned num_iters = 10;
604602

603+
// Reducing number of iterations for esimd_emulator backend in order
604+
// to avoid timeout failure
605+
if (pQueue_->get_backend() == cl::sycl::backend::ext_intel_esimd_emulator) {
606+
num_iters = 2;
607+
}
608+
605609
// num_iters + 1, iteration#0 is for warmup
606610
for (int iter = 0; iter <= num_iters; ++iter) {
607611
try {

SYCL/ESIMD/BitonicSortKv2.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,12 @@ int BitonicSort::Solve(uint32_t *pInputs, uint32_t *pOutputs, uint32_t size) {
521521
double kernel_times = 0;
522522
unsigned num_iters = 10;
523523

524+
// Reducing number of iterations for esimd_emulator backend in order
525+
// to avoid timeout failure
526+
if (pQueue_->get_backend() == cl::sycl::backend::ext_intel_esimd_emulator) {
527+
num_iters = 2;
528+
}
529+
524530
// num_iters + 1, iteration#0 is for warmup
525531
for (int iter = 0; iter <= num_iters; ++iter) {
526532
// enqueue sort265 kernel

SYCL/ESIMD/accessor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl -D_CRT_SECURE_NO_WARNINGS=1 %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/aot_mixed.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10+
// UNSUPPORTED: esimd_emulator
1011
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device gen9" -o %t.sycl.out -DENABLE_SYCL=0 %s
1112
// RUN: %GPU_RUN_PLACEHOLDER %t.sycl.out
1213
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device gen9" -o %t.out %s

SYCL/ESIMD/api/ballot.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated memory intrinsic
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/api/simd_binop_integer_promotion.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated memory intrinsic
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412
//

SYCL/ESIMD/api/simd_negation_operator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412
//

SYCL/ESIMD/api/simd_subscript_operator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated memory intrinsic
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412
//

SYCL/ESIMD/api/simd_view_negation_operator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412
//

SYCL/ESIMD/api/simd_view_subscript_operator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412
//

SYCL/ESIMD/api/slm_gather_scatter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// REQUIRES: gpu
22
// UNSUPPORTED: cuda || hip
3-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter_scaled
4-
// XFAIL: esimd_emulator
53
// RUN: %clangxx -fsycl %s -o %t.out
64
// RUN: %GPU_RUN_PLACEHOLDER %t.out
75
//

SYCL/ESIMD/api/slm_gather_scatter_rgba.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// REQUIRES: gpu
22
// UNSUPPORTED: cuda || hip
3-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter_scaled
4-
// XFAIL: esimd_emulator
53
// RUN: %clangxx -fsycl %s -o %t.out
64
// RUN: %GPU_RUN_PLACEHOLDER %t.out
75
//

SYCL/ESIMD/fp_in_phi.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1515
// UNSUPPORTED: cuda || hip
1616
// UNSUPPORTED: ze_debug-1,ze_debug4
17-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter_scaled
18-
// XFAIL: esimd_emulator
1917
//
2018
// The test checks that ESIMD kernels correctly handle function pointers as
2119
// arguments of LLVM's PHI function.

SYCL/ESIMD/histogram.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated __esimd_media_ld
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/histogram_256_slm.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter_scaled
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/histogram_2d.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated __esimd_media_ld
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/histogram_raw_send.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// REQUIRES: gpu
1010
// UNSUPPORTED: gpu-intel-dg1,cuda,hip
1111
// UNSUPPORTED: ze_debug-1,ze_debug4
12-
// TODO: esimd_emulator fails due to outdated __esimd_media_ld
13-
// XFAIL: esimd_emulator
1412
// RUN: %clangxx -fsycl %s -o %t.out
1513
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1614

SYCL/ESIMD/linear/linear.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated __esimd_media_ld
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out %S/linear_in.bmp %S/linear_gold_hw.bmp
1412

SYCL/ESIMD/matrix_transpose2.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ using namespace cl::sycl;
2525
using namespace std;
2626
using namespace sycl::ext::intel::experimental::esimd;
2727

28+
const unsigned int ESIMD_EMULATOR_SIZE_LIMIT = 1U << 10;
29+
2830
void initMatrix(int *M, unsigned N) {
2931
assert(N >= 8 && (((N - 1) & N) == 0) &&
3032
"only power of 2 (>= 16) is supported");
@@ -278,6 +280,16 @@ bool runTest(unsigned MZ, unsigned block_size, unsigned num_iters,
278280
cerr << "\nTranspose square matrix of size " << MZ << "\n";
279281
// printMatrix("Initial matrix:", M, MZ);
280282

283+
if ((q.get_backend() == cl::sycl::backend::ext_intel_esimd_emulator) &&
284+
(MZ > ESIMD_EMULATOR_SIZE_LIMIT)) {
285+
cerr << "Matrix Size larger than " << ESIMD_EMULATOR_SIZE_LIMIT
286+
<< " is skipped"
287+
<< "\n";
288+
cerr << "for esimd_emulator backend due to timeout"
289+
<< "\n";
290+
return true;
291+
}
292+
281293
// Each C-for-Metal thread works on one or two blocks of size 8 x 8.
282294
int thread_width = MZ / block_size;
283295
int thread_height = MZ / block_size;

SYCL/ESIMD/preemption.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu && linux
99
// UNSUPPORTED: cuda || hip
10+
// UNSUPPORTED: esimd_emulator
1011
// RUN: %clangxx -fsycl %s -o %t.out
1112
// RUN: %GPU_RUN_PLACEHOLDER IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 %t.out
1213
// RUN: grep enablePreemption %t.dump/*.asm

SYCL/ESIMD/regression/operator_decrement.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
//
1010
// REQUIRES: gpu
1111
// UNSUPPORTED: cuda || hip
12-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
13-
// XFAIL: esimd_emulator
1412
// RUN: %clangxx -fsycl -I%S/.. %s -o %t.out
1513
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1614

SYCL/ESIMD/regression/unused_load.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl -I%S/.. %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/regression/variable_gather_mask.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10+
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
11+
// XFAIL: esimd_emulator
1012
// RUN: %clangxx -fsycl %s -o %t.out
1113
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1214
//

SYCL/ESIMD/slm_barrier.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter_scaled4
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/slm_split_barrier.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// RUN: %clangxx -fsycl %s -o %t.out
1010
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1111
// UNSUPPORTED: cuda || hip
12-
// TODO: esimd_emulator fails due to unimplemented __esimd_scatter4_scaled
13-
// XFAIL: esimd_emulator
1412

1513
#include "esimd_test_utils.hpp"
1614

SYCL/ESIMD/vadd_1d.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/vadd_2d.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to outdated __esimd_media_ld
11-
// XFAIL: esimd_emulator
1210
// RUN: %clangxx -fsycl %s -o %t.out
1311
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1412

SYCL/ESIMD/vadd_2d_acc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1111

1212
// UNSUPPORTED: cuda || hip
13-
// TODO: esimd_emulator fails due to unimplemented __esimd_oword_ld_unaligned
14-
// XFAIL: esimd_emulator
1513

1614
// The test checks that 2D workitem addressing works correctly with SIMD
1715
// kernels.

0 commit comments

Comments
 (0)