Skip to content

Commit 4c2cbc5

Browse files
authored
[SYCL][Bindless] Enable non-Vulkan tests on Windows (#14045)
Bindless Images should now properly work on Windows, with the exception of Vulkan interop, which requires extra work. Required a few fixes to non-conformant C++ code.
1 parent 3d9ded6 commit 4c2cbc5

33 files changed

+11
-39
lines changed

sycl/test-e2e/bindless_images/bindless_helpers.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ static void fill_rand(std::vector<sycl::vec<DType, NChannels>> &v,
5353
return std::uniform_real_distribution<float>(0.0, 100.0);
5454
} else if constexpr (std::is_floating_point_v<DType>) {
5555
return std::uniform_real_distribution<DType>(0.0, 100.0);
56+
} else if constexpr (sizeof(DType) == 1) {
57+
return std::uniform_int_distribution<unsigned short>(0, 100);
5658
} else {
5759
return std::uniform_int_distribution<DType>(0, 100);
5860
}
@@ -61,7 +63,7 @@ static void fill_rand(std::vector<sycl::vec<DType, NChannels>> &v,
6163
sycl::vec<DType, NChannels> temp;
6264

6365
for (int j = 0; j < NChannels; j++) {
64-
temp[j] = distribution(generator);
66+
temp[j] = static_cast<DType>(distribution(generator));
6567
}
6668

6769
v[i] = temp;

sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: linux,cuda,aspect-ext_oneapi_cubemap
1+
// REQUIRES: cuda,aspect-ext_oneapi_cubemap
22
// REQUIRES: aspect-ext_oneapi_cubemap_seamless_filtering
33

44
// RUN: %{build} -o %t.out

sycl/test-e2e/bindless_images/cubemap/cubemap_unsampled.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: linux,cuda,aspect-ext_oneapi_cubemap
1+
// REQUIRES: cuda,aspect-ext_oneapi_cubemap
22

33
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
44
// RUN: %t.out

sycl/test-e2e/bindless_images/device_to_device_copy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %{build} -o %t.out

sycl/test-e2e/bindless_images/image_get_info.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
@@ -160,13 +159,13 @@ int main() {
160159

161160
failed += runTest<int, sycl::image_channel_type::signed_int32>();
162161

163-
failed += runTest<uint, sycl::image_channel_type::unsigned_int32>();
162+
failed += runTest<unsigned int, sycl::image_channel_type::unsigned_int32>();
164163

165164
failed += runTest<float, sycl::image_channel_type::fp32>();
166165

167166
failed += runTest<short, sycl::image_channel_type::signed_int16>();
168167

169-
failed += runTest<ushort, sycl::image_channel_type::unsigned_int16>();
168+
failed += runTest<unsigned short, sycl::image_channel_type::unsigned_int16>();
170169

171170
failed += runTest<char, sycl::image_channel_type::signed_int8>();
172171

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
@@ -167,13 +166,13 @@ int main() {
167166

168167
failed += runTest<int, sycl::image_channel_type::signed_int32>();
169168

170-
failed += runTest<uint, sycl::image_channel_type::unsigned_int32>();
169+
failed += runTest<unsigned int, sycl::image_channel_type::unsigned_int32>();
171170

172171
failed += runTest<float, sycl::image_channel_type::fp32>();
173172

174173
failed += runTest<short, sycl::image_channel_type::signed_int16>();
175174

176-
failed += runTest<ushort, sycl::image_channel_type::unsigned_int16>();
175+
failed += runTest<unsigned short, sycl::image_channel_type::unsigned_int16>();
177176

178177
failed += runTest<char, sycl::image_channel_type::signed_int8>();
179178

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
@@ -159,13 +158,13 @@ int main() {
159158

160159
failed += runTest<int, sycl::image_channel_type::signed_int32>();
161160

162-
failed += runTest<uint, sycl::image_channel_type::unsigned_int32>();
161+
failed += runTest<unsigned int, sycl::image_channel_type::unsigned_int32>();
163162

164163
failed += runTest<float, sycl::image_channel_type::fp32>();
165164

166165
failed += runTest<short, sycl::image_channel_type::signed_int16>();
167166

168-
failed += runTest<ushort, sycl::image_channel_type::unsigned_int16>();
167+
failed += runTest<unsigned short, sycl::image_channel_type::unsigned_int16>();
169168

170169
failed += runTest<char, sycl::image_channel_type::signed_int8>();
171170

sycl/test-e2e/bindless_images/read_1D.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out

sycl/test-e2e/bindless_images/read_2D.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: linux
21
// REQUIRES: cuda
32

43
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out

0 commit comments

Comments
 (0)