Skip to content

[SYCL] Refactor program to improve ABI stability #938

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 21 commits into from
Dec 30, 2019

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 modifications were applied to program and program_impl
classes:

  1. Removed include of program_impl header from program.hpp and replaced
    it with forward declaration.
  2. Move member function implementations from program.hpp to program.cpp
  3. std::shared_ptr was replaced with shared_ptr_class for program class
  4. Documentation was improved for both program and program_impl
  5. program_impl now tries to follow LLVM code style
  6. program_impl now uses string kernel name instead of kernel type

Applying aforementioned changes requires modifying other header files.
While some of those may seem as a regression, affected classes will be
covered by future patches.

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

std::make_shared<kernel_impl>(get_pi_kernel(KernelName), Context,
PtrToSelf, /*IsCreatedFromSource*/ true));
}
std::shared_ptr<program_impl> PtrToSelf,
Copy link
Contributor

Choose a reason for hiding this comment

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

shared_ptr_class?

Copy link
Contributor

Choose a reason for hiding this comment

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

All these _class will probably be deprecated at some point, so I do not thing this change is important.

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 although it is not part of public interface and these methods are not called outside RT (thus no need to use _class), I still applied your suggestion as it makes call stack more consistent (less conversion between different types).

@keryell that's new information for me. Is there some discussion or any other source of information so I can ramp up myself?

Copy link
Contributor

Choose a reason for hiding this comment

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

Talk to your SYCL committee representative. I think the problem is that it is not really implementable in a portable way and not testable with some CTS... So why not just using the STL nowadays?

@alexbatashev alexbatashev force-pushed the private/abatashe/refactor_program branch 2 times, most recently from b8a6435 to 747dee6 Compare December 25, 2019 07:06
@alexbatashev alexbatashev force-pushed the private/abatashe/refactor_program branch 2 times, most recently from 578b8d6 to 0314a6b Compare December 26, 2019 12:56
Alexander Batashev added 21 commits December 26, 2019 15:57
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]>
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]>
@alexbatashev alexbatashev force-pushed the private/abatashe/refactor_program branch from 0314a6b to ef7c05a Compare December 26, 2019 12:59
@alexbatashev
Copy link
Contributor Author

@romanovvlad ping

@romanovvlad romanovvlad merged commit 3d8dbd0 into intel:sycl Dec 30, 2019
@alexbatashev alexbatashev deleted the private/abatashe/refactor_program branch December 30, 2019 14:30
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.

4 participants