Skip to content

[SYCL] Refactor memory objects to improve ABI stability #1076

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 17 commits into from
Feb 5, 2020

Conversation

alexbatashev
Copy link
Contributor

This patch is a part of effort to decouple SYCL Runtime library
interface from its actual implementation. The goal is to improve
SYCL ABI/API compatibility between different versions of library.

The following changes were applied to SYCLMemObjT, as well as
buffer and image classes:

  1. Introduced a type-erased allocator. This allowed removal of
    templates for SYCLMemObjT, buffer_impl, and image_imp.
  2. sycl_mem_obj_t.hpp, image_impl.hpp, and buffer_impl.hpp
    were refactored to use public APIs only. All usages of private
    APIs were moved to cpp files.
  3. get_access member functions were moved from image_impl
    and buffer_impl to image and buffer accordingly, since they
    did not use any private APIs at all.

Signed-off-by: Alexander Batashev [email protected]

Alexander Batashev added 15 commits February 2, 2020 15:18
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
#include <CL/sycl/detail/sycl_mem_obj_i.hpp>
#include <CL/sycl/detail/type_traits.hpp>
#include <CL/sycl/event.hpp>
#include <CL/sycl/property_list.hpp>
#include <CL/sycl/stl.hpp>

#include <type_traits>
#include <cstring>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe cstring should be placed before type_traits

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that suggested placement is correct. See LLVM Coding Standards: there are 4 main sections of includes, each of them is sorted alphabetically, but they didn't overlap between each other

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexeySachkov I have moved cstring above type_traits. For some reason GitHub doesn't show this comment as outdated.

Copy link
Contributor

@romanovvlad romanovvlad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Alexander Batashev added 2 commits February 4, 2020 10:38
Signed-off-by: Alexander Batashev <[email protected]>
Signed-off-by: Alexander Batashev <[email protected]>
@alexbatashev alexbatashev force-pushed the private/abatashe/refactor_buffer branch from 6ce3fd0 to 47117d5 Compare February 4, 2020 07:39
@romanovvlad romanovvlad merged commit d357020 into intel:sycl Feb 5, 2020
@alexbatashev alexbatashev deleted the private/abatashe/refactor_buffer branch February 5, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants