Skip to content

[SYCL] Split image accessor code into a separate include #13500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,348 changes: 8 additions & 1,340 deletions sycl/include/sycl/accessor.hpp

Large diffs are not rendered by default.

1,344 changes: 1,344 additions & 0 deletions sycl/include/sycl/accessor_image.hpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sycl/include/sycl/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <sycl/detail/core.hpp>

#include <sycl/accessor_image.hpp>
#include <sycl/aspects.hpp>
#include <sycl/atomic.hpp>
#include <sycl/atomic_fence.hpp>
Expand Down
1 change: 1 addition & 0 deletions sycl/source/accessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <detail/queue_impl.hpp>
#include <detail/sycl_mem_obj_t.hpp>
#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>

namespace sycl {
inline namespace _V1 {
Expand Down
1 change: 1 addition & 0 deletions sycl/source/detail/accessor_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <sycl/access/access.hpp>
#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/id.hpp>
#include <sycl/property_list.hpp>
Expand Down
1 change: 1 addition & 0 deletions sycl/source/detail/image_accessor_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>
#include <sycl/builtins.hpp>

namespace sycl {
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/image/image_accessor_readwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cassert>
#include <iomanip>
#include <sycl/accessor_image.hpp>
#include <sycl/detail/core.hpp>
#if DEBUG_OUTPUT
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/image/image_max_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// The test checks that 'image' with max allowed sizes is handled correctly.

#include <iostream>
#include <sycl/accessor_image.hpp>
#include <sycl/detail/core.hpp>
using namespace sycl;

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/image/image_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Temporarily disable test on Windows due to regressions in GPU driver.
// UNSUPPORTED: hip, windows

#include <sycl/accessor_image.hpp>
#include <sycl/detail/core.hpp>

#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Regression/image_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <iostream>

#include <sycl/accessor_image.hpp>
#include <sycl/detail/core.hpp>

int main() {
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Sampler/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <sycl/detail/core.hpp>

#include <sycl/accessor_image.hpp>
#include <sycl/builtins.hpp>

using namespace sycl;
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/XPTI/image/accessors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#else

#include <sycl/accessor_image.hpp>
#include <sycl/detail/core.hpp>

using namespace sycl::access;
Expand Down
1 change: 1 addition & 0 deletions sycl/test/abi/layout_accessors_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// clang-format off

#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>

using namespace sycl;

Expand Down
1 change: 1 addition & 0 deletions sycl/test/abi/layout_accessors_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// clang-format off

#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>

using namespace sycl;

Expand Down
4 changes: 2 additions & 2 deletions sycl/test/basic_tests/image_accessor_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ int main() {
myQueue.submit([&](handler &cgh) {
accessor<float, 2, access::mode::read, access::target::image> NotValidType1(
srcImage, cgh);
// expected-error@sycl/accessor.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
// expected-error@sycl/accessor_image.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
accessor<int2, 2, access::mode::read, access::target::image> NotValidType2(
srcImage, cgh);
// expected-error@sycl/accessor.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
// expected-error@sycl/accessor_image.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
accessor<float4, 2, access::mode::read, access::target::image>
ValidSYCLFloat(srcImage, cgh);
accessor<int4, 2, access::mode::read, access::target::image> ValidSYCLInt(
Expand Down
6 changes: 2 additions & 4 deletions sycl/test/include_deps/sycl_accessor.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@
// CHECK-NEXT: detail/accessor_iterator.hpp
// CHECK-NEXT: detail/generic_type_traits.hpp
// CHECK-NEXT: detail/handler_proxy.hpp
// CHECK-NEXT: detail/image_accessor_util.hpp
// CHECK-NEXT: device.hpp
// CHECK-NEXT: kernel_bundle_enums.hpp
// CHECK-NEXT: pointers.hpp
// CHECK-NEXT: properties/accessor_properties.hpp
// CHECK-NEXT: image.hpp
// CHECK-NEXT: detail/backend_traits.hpp
// CHECK-NEXT: sampler.hpp
Expand All @@ -125,8 +126,5 @@
// CHECK-NEXT: detail/memcpy.hpp
// CHECK-NEXT: detail/vector_convert.hpp
// CHECK-NEXT: swizzles.def
// CHECK-NEXT: pointers.hpp
// CHECK-NEXT: properties/accessor_properties.hpp
// CHECK-NEXT: properties/buffer_properties.hpp
// CHECK-NEXT: detail/image_ocl_types.hpp
// CHECK-EMPTY:
6 changes: 2 additions & 4 deletions sycl/test/include_deps/sycl_detail_core.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@
// CHECK-NEXT: detail/accessor_iterator.hpp
// CHECK-NEXT: detail/generic_type_traits.hpp
// CHECK-NEXT: detail/handler_proxy.hpp
// CHECK-NEXT: detail/image_accessor_util.hpp
// CHECK-NEXT: device.hpp
// CHECK-NEXT: kernel_bundle_enums.hpp
// CHECK-NEXT: pointers.hpp
// CHECK-NEXT: properties/accessor_properties.hpp
// CHECK-NEXT: image.hpp
// CHECK-NEXT: detail/backend_traits.hpp
// CHECK-NEXT: sampler.hpp
Expand All @@ -126,10 +127,7 @@
// CHECK-NEXT: detail/memcpy.hpp
// CHECK-NEXT: detail/vector_convert.hpp
// CHECK-NEXT: swizzles.def
// CHECK-NEXT: pointers.hpp
// CHECK-NEXT: properties/accessor_properties.hpp
// CHECK-NEXT: properties/buffer_properties.hpp
// CHECK-NEXT: detail/image_ocl_types.hpp
// CHECK-NEXT: queue.hpp
// CHECK-NEXT: detail/assert_happened.hpp
// CHECK-NEXT: detail/cg_types.hpp
Expand Down