Skip to content

Commit

Permalink
[SYCL][Bindless] Enable non-Vulkan tests on Windows (intel#14045)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ProGTX authored and ianayl committed Jun 13, 2024
1 parent 2e51c65 commit f732ef3
Show file tree
Hide file tree
Showing 33 changed files with 11 additions and 39 deletions.
4 changes: 3 additions & 1 deletion sycl/test-e2e/bindless_images/bindless_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ static void fill_rand(std::vector<sycl::vec<DType, NChannels>> &v,
return std::uniform_real_distribution<float>(0.0, 100.0);
} else if constexpr (std::is_floating_point_v<DType>) {
return std::uniform_real_distribution<DType>(0.0, 100.0);
} else if constexpr (sizeof(DType) == 1) {
return std::uniform_int_distribution<unsigned short>(0, 100);
} else {
return std::uniform_int_distribution<DType>(0, 100);
}
Expand All @@ -61,7 +63,7 @@ static void fill_rand(std::vector<sycl::vec<DType, NChannels>> &v,
sycl::vec<DType, NChannels> temp;

for (int j = 0; j < NChannels; j++) {
temp[j] = distribution(generator);
temp[j] = static_cast<DType>(distribution(generator));
}

v[i] = temp;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/bindless_images/cubemap/cubemap_sampled.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: linux,cuda,aspect-ext_oneapi_cubemap
// REQUIRES: cuda,aspect-ext_oneapi_cubemap
// REQUIRES: aspect-ext_oneapi_cubemap_seamless_filtering

// RUN: %{build} -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: linux,cuda,aspect-ext_oneapi_cubemap
// REQUIRES: cuda,aspect-ext_oneapi_cubemap

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
// RUN: %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/device_to_device_copy.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %{build} -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/image_get_info.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
5 changes: 2 additions & 3 deletions sycl/test-e2e/bindless_images/mipmap/mipmap_read_1D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

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

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

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

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

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

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

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

Expand Down
5 changes: 2 additions & 3 deletions sycl/test-e2e/bindless_images/mipmap/mipmap_read_2D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

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

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

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

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

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

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

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

Expand Down
5 changes: 2 additions & 3 deletions sycl/test-e2e/bindless_images/mipmap/mipmap_read_3D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

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

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

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

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

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

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

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

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_1D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_2D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_2D_dynamic.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_3D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_norm_types.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %{build} -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_sampled.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_1D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_1D_subregion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_2D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_2D_subregion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_3D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_3D_subregion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/read_write_unsampled.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-ext_oneapi_bindless_sampled_image_fetch_1d_usm

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampled_fetch/fetch_2D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-ext_oneapi_bindless_sampled_image_fetch_2d

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-ext_oneapi_bindless_sampled_image_fetch_2d_usm

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampled_fetch/fetch_3D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-ext_oneapi_bindless_sampled_image_fetch_3d

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampling_1D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampling_2D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampling_2D_USM_shared.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-ext_oneapi_bindless_images_shared_usm

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampling_2D_half.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda
// REQUIRES: aspect-fp16

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/bindless_images/sampling_3D.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %{build} -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

// RUN: %{build} -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: linux
// REQUIRES: cuda

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

0 comments on commit f732ef3

Please sign in to comment.