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

Commit 36e7560

Browse files
authored
[SYCL][ESIMD] Fix Stencil test result mismatch with large input. (#148)
1 parent 2984d92 commit 36e7560

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

SYCL/ESIMD/Stencil.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// test smaller input size
2222
// test 8x16 block size
2323
//
24-
#define DIM_SIZE (1 << 10)
24+
#define DIM_SIZE (1 << 13)
2525
#define SQUARE_SZ (DIM_SIZE * DIM_SIZE)
2626

2727
#define WIDTH 16
@@ -145,11 +145,6 @@ int main(void) {
145145
in.row(i + 2).select<WIDTH, 1>(5) * -0.0333333333333f +
146146
in.row(i + 3).select<WIDTH, 1>(5) * -0.05f +
147147
in.row(i + 4).select<WIDTH, 1>(5) * -0.1f +
148-
in.row(i + 6).select<WIDTH, 1>(5) * 0.1f +
149-
in.row(i + 7).select<WIDTH, 1>(5) * 0.05f +
150-
in.row(i + 8).select<WIDTH, 1>(5) * 0.0333333333333f +
151-
in.row(i + 9).select<WIDTH, 1>(5) * 0.025f +
152-
in.row(i + 10).select<WIDTH, 1>(5) * 0.02f +
153148
in.row(i + 5).select<WIDTH, 1>(0) * -0.02f +
154149
in.row(i + 5).select<WIDTH, 1>(1) * -0.025f +
155150
in.row(i + 5).select<WIDTH, 1>(2) * -0.0333333333333f +
@@ -159,7 +154,12 @@ int main(void) {
159154
in.row(i + 5).select<WIDTH, 1>(7) * 0.05f +
160155
in.row(i + 5).select<WIDTH, 1>(8) * 0.0333333333333f +
161156
in.row(i + 5).select<WIDTH, 1>(9) * 0.025f +
162-
in.row(i + 5).select<WIDTH, 1>(10) * 0.02f;
157+
in.row(i + 5).select<WIDTH, 1>(10) * 0.02f +
158+
in.row(i + 6).select<WIDTH, 1>(5) * 0.1f +
159+
in.row(i + 7).select<WIDTH, 1>(5) * 0.05f +
160+
in.row(i + 8).select<WIDTH, 1>(5) * 0.0333333333333f +
161+
in.row(i + 9).select<WIDTH, 1>(5) * 0.025f +
162+
in.row(i + 10).select<WIDTH, 1>(5) * 0.02f;
163163

164164
// predciate output
165165
simd<ushort, WIDTH> p = (elm16 + h_pos * WIDTH) < DIM_SIZE - 10;

SYCL/ESIMD/stencil2.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// test smaller input size
2222
// test 8x16 block size
2323
//
24-
#define DIM_SIZE (1 << 10)
24+
#define DIM_SIZE (1 << 13)
2525
#define SQUARE_SZ (DIM_SIZE * DIM_SIZE)
2626

2727
#define WIDTH 16
@@ -147,11 +147,6 @@ int main(void) {
147147
vin.select<WIDTH, 1>(GET_IDX(i + 2, 5)) * -0.0333333333333f +
148148
vin.select<WIDTH, 1>(GET_IDX(i + 3, 5)) * -0.05f +
149149
vin.select<WIDTH, 1>(GET_IDX(i + 4, 5)) * -0.1f +
150-
vin.select<WIDTH, 1>(GET_IDX(i + 6, 5)) * 0.1f +
151-
vin.select<WIDTH, 1>(GET_IDX(i + 7, 5)) * 0.05f +
152-
vin.select<WIDTH, 1>(GET_IDX(i + 8, 5)) * 0.0333333333333f +
153-
vin.select<WIDTH, 1>(GET_IDX(i + 9, 5)) * 0.025f +
154-
vin.select<WIDTH, 1>(GET_IDX(i + 10, 5)) * 0.02f +
155150
vin.select<WIDTH, 1>(GET_IDX(i + 5, 0)) * -0.02f +
156151
vin.select<WIDTH, 1>(GET_IDX(i + 5, 1)) * -0.025f +
157152
vin.select<WIDTH, 1>(GET_IDX(i + 5, 2)) * -0.0333333333333f +
@@ -161,7 +156,12 @@ int main(void) {
161156
vin.select<WIDTH, 1>(GET_IDX(i + 5, 7)) * 0.05f +
162157
vin.select<WIDTH, 1>(GET_IDX(i + 5, 8)) * 0.0333333333333f +
163158
vin.select<WIDTH, 1>(GET_IDX(i + 5, 9)) * 0.025f +
164-
vin.select<WIDTH, 1>(GET_IDX(i + 5, 10)) * 0.02f;
159+
vin.select<WIDTH, 1>(GET_IDX(i + 5, 10)) * 0.02f +
160+
vin.select<WIDTH, 1>(GET_IDX(i + 6, 5)) * 0.1f +
161+
vin.select<WIDTH, 1>(GET_IDX(i + 7, 5)) * 0.05f +
162+
vin.select<WIDTH, 1>(GET_IDX(i + 8, 5)) * 0.0333333333333f +
163+
vin.select<WIDTH, 1>(GET_IDX(i + 9, 5)) * 0.025f +
164+
vin.select<WIDTH, 1>(GET_IDX(i + 10, 5)) * 0.02f;
165165

166166
// predciate output
167167
simd<ushort, WIDTH> p = (elm16 + h_pos * WIDTH) < DIM_SIZE - 10;

0 commit comments

Comments
 (0)