Skip to content

Commit 80ae73e

Browse files
authored
[NFC][SYCL][Bindless] Don't use double type in e2e tests (intel#12205)
double type needs -ze-fp64-gen-emu compile flag on DG2. Adding the flag each time is inconvenient for testing.
1 parent 331bd5d commit 80ae73e

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed

sycl/test-e2e/bindless_images/mipmap/mipmap_read_1D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ template <typename DType, sycl::image_channel_type CType> bool runTest() {
9494

9595
cgh.parallel_for<kernel<DType, CType>>(N, [=](sycl::id<1> id) {
9696
DType sum = 0;
97-
float x = float(id[0] + 0.5) / (float)N;
97+
float x = float(id[0] + 0.5f) / (float)N;
9898
// Extension: read mipmap level 0 with anisotropic filtering and level 1
9999
// with LOD
100100
VecType px1 = sycl::ext::oneapi::experimental::read_mipmap<VecType>(

sycl/test-e2e/bindless_images/mipmap/mipmap_read_2D.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ template <typename DType, sycl::image_channel_type CType> bool runTest() {
107107
size_t dim1 = it.get_local_id(1);
108108

109109
// Normalize coordinates -- +0.5 to look towards centre of pixel
110-
float fdim0 = float(dim0 + 0.5) / (float)width;
111-
float fdim1 = float(dim1 + 0.5) / (float)height;
110+
float fdim0 = float(dim0 + 0.5f) / (float)width;
111+
float fdim1 = float(dim1 + 0.5f) / (float)height;
112112

113113
// Extension: read mipmap level 1 with LOD
114114
VecType px2 = sycl::ext::oneapi::experimental::read_mipmap<VecType>(

sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ template <typename DType, sycl::image_channel_type CType> bool runTest() {
9595
size_t dim2 = it.get_local_id(2);
9696

9797
// Normalize coordinates -- +0.5 to look towards centre of pixel
98-
float fdim0 = float(dim0 + 0.5) / (float)width;
99-
float fdim1 = float(dim1 + 0.5) / (float)height;
100-
float fdim2 = float(dim2 + 0.5) / (float)depth;
98+
float fdim0 = float(dim0 + 0.5f) / (float)width;
99+
float fdim1 = float(dim1 + 0.5f) / (float)height;
100+
float fdim2 = float(dim2 + 0.5f) / (float)depth;
101101

102102
// Extension: read mipmap with anisotropic filtering with zero
103103
// viewing gradients

sycl/test-e2e/bindless_images/sampling_1D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main() {
6767

6868
cgh.parallel_for<image_addition>(N, [=](sycl::id<1> id) {
6969
// Normalize coordinate -- +0.5 to look towards centre of pixel
70-
float x = float(id[0] + 0.5) / (float)N;
70+
float x = float(id[0] + 0.5f) / (float)N;
7171
// Extension: read image data from handle
7272
float px1 =
7373
sycl::ext::oneapi::experimental::read_image<float>(imgHandle, x);

sycl/test-e2e/bindless_images/sampling_2D.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ int main() {
9595
size_t dim1 = it.get_local_id(1);
9696

9797
// Normalize coordinates -- +0.5 to look towards centre of pixel
98-
float fdim0 = float(dim0 + 0.5) / (float)width;
99-
float fdim1 = float(dim1 + 0.5) / (float)height;
98+
float fdim0 = float(dim0 + 0.5f) / (float)width;
99+
float fdim1 = float(dim1 + 0.5f) / (float)height;
100100

101101
// Extension: read image data from handle
102102
sycl::float4 px1 =

sycl/test-e2e/bindless_images/sampling_2D_USM_shared.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ int main() {
9494
size_t dim1 = it.get_local_id(1);
9595

9696
// Normalize coordinates -- +0.5 to look towards centre of pixel
97-
float fdim0 = float(dim0 + 0.5) / (float)width;
98-
float fdim1 = float(dim1 + 0.5) / (float)height;
97+
float fdim0 = float(dim0 + 0.5f) / (float)width;
98+
float fdim1 = float(dim1 + 0.5f) / (float)height;
9999

100100
// Extension: read image data from handle
101101
float px = sycl::ext::oneapi::experimental::read_image<float>(

sycl/test-e2e/bindless_images/sampling_2D_half.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ int main() {
7979
size_t dim1 = it.get_local_id(1);
8080

8181
// Normalize coordinates -- +0.5 to look towards centre of pixel
82-
float fdim0 = float(dim0 + 0.5) / (float)width;
83-
float fdim1 = float(dim1 + 0.5) / (float)height;
82+
float fdim0 = float(dim0 + 0.5f) / (float)width;
83+
float fdim1 = float(dim1 + 0.5f) / (float)height;
8484

8585
// Extension: read image data from handle
8686
sycl::half4 px1 =

sycl/test-e2e/bindless_images/sampling_3D.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ int main() {
7373
size_t dim2 = it.get_local_id(2);
7474

7575
// Normalize coordinates -- +0.5 to look towards centre of pixel
76-
float fdim0 = float(dim0 + 0.5) / (float)width;
77-
float fdim1 = float(dim1 + 0.5) / (float)height;
78-
float fdim2 = float(dim2 + 0.5) / (float)depth;
76+
float fdim0 = float(dim0 + 0.5f) / (float)width;
77+
float fdim1 = float(dim1 + 0.5f) / (float)height;
78+
float fdim2 = float(dim2 + 0.5f) / (float)depth;
7979

8080
// Extension: read image data from handle
8181
sycl::float4 px1 =

sycl/test-e2e/bindless_images/user_types/mipmap_read_user_type_2D.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ bool run_test() {
116116
size_t dim1 = it.get_local_id(1);
117117

118118
// Normalize coordinates -- +0.5 to look towards centre of pixel
119-
float fdim0 = float(dim0 + 0.5) / (float)width;
120-
float fdim1 = float(dim1 + 0.5) / (float)height;
119+
float fdim0 = float(dim0 + 0.5f) / (float)width;
120+
float fdim1 = float(dim1 + 0.5f) / (float)height;
121121

122122
// Extension: read mipmap level 1 with LOD
123123
MyType pixel =

sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ bool run_sycl(sycl::range<NDims> globalSize, sycl::range<NDims> localSize,
143143
size_t dim2 = it.get_global_id(2);
144144

145145
// Normalize coordinates -- +0.5 to look towards centre of pixel
146-
float fdim0 = float(dim0 + 0.5) / (float)width;
147-
float fdim1 = float(dim1 + 0.5) / (float)height;
148-
float fdim2 = float(dim2 + 0.5) / (float)depth;
146+
float fdim0 = float(dim0 + 0.5f) / (float)width;
147+
float fdim1 = float(dim1 + 0.5f) / (float)height;
148+
float fdim2 = float(dim2 + 0.5f) / (float)depth;
149149

150150
// Extension: read image data from handle (Vulkan imported)
151151
VecType pixel;
@@ -160,8 +160,8 @@ bool run_sycl(sycl::range<NDims> globalSize, sycl::range<NDims> localSize,
160160
size_t dim1 = it.get_global_id(1);
161161

162162
// Normalize coordinates -- +0.5 to look towards centre of pixel
163-
float fdim0 = float(dim0 + 0.5) / (float)width;
164-
float fdim1 = float(dim1 + 0.5) / (float)height;
163+
float fdim0 = float(dim0 + 0.5f) / (float)width;
164+
float fdim1 = float(dim1 + 0.5f) / (float)height;
165165

166166
// Extension: read image data from handle (Vulkan imported)
167167
VecType pixel = syclexp::read_image<

0 commit comments

Comments
 (0)