-
Notifications
You must be signed in to change notification settings - Fork 113
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
Multiple backends prototype #1509
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@akukanov If this approach looks ok we may try to extend it for hetero backends too, |
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
3 times, most recently
from
April 18, 2024 16:27
04a015a
to
dedd021
Compare
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
4 times, most recently
from
April 25, 2024 12:21
4963507
to
96ffc59
Compare
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
from
May 3, 2024 07:35
96ffc59
to
8869f85
Compare
Unfortunately, it breaks one of tag dispatching advantage - to have possibility to overload (via C++ function overloading mechanism) backend pattern implementation by a user tag. |
May be I don’t understand what you mean, but I think it’s still possible for the users:
* Instead of function overload whey should implement some full backend that they wants.
With the best regards,
Sergey Kopienko
From: MikeDvorskiy ***@***.***>
Sent: Tuesday, May 7, 2024 4:08 PM
To: oneapi-src/oneDPL ***@***.***>
Cc: Kopienko, Sergey ***@***.***>; Assign ***@***.***>
Subject: Re: [oneapi-src/oneDPL] Multiple backends prototype (PR #1509)
* move backend public API functions into these structures;
Unfortunately, it breaks one of tag dispatching advantage - to have possibility to overload (via C++ function overloading mechanism) backend pattern implementation by a user tag.
—
Reply to this email directly, view it on GitHub<#1509 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWBJJSW2DEWEZ2G6GSGEXWTZBDN4RAVCNFSM6AAAAABGLAQFGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGQ4TOMZYHE>.
You are receiving this because you were assigned.Message ID: ***@***.******@***.***>>
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
|
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
from
May 7, 2024 14:11
8869f85
to
6c6bca9
Compare
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
3 times, most recently
from
May 23, 2024 07:44
f911969
to
547aa3a
Compare
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
from
June 10, 2024 14:51
547aa3a
to
ef66673
Compare
…struct definition struct __backend_impl; Signed-off-by: Sergey Kopienko <[email protected]>
…backend as template alias
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
… implementation of OMP backend Signed-off-by: Sergey Kopienko <[email protected]>
… implementation of TBB backend Signed-off-by: Sergey Kopienko <[email protected]>
…> - implementation of SERIAL backend Signed-off-by: Sergey Kopienko <[email protected]>
…ementations together + fix test
…qual_value_by_pred required full namespace name due implemented in another namespace
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
…api::dpl::__internal namespace Signed-off-by: Sergey Kopienko <[email protected]>
…ar_backend_buffer template aliases into oneapi::dpl namespace Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
…l_for_body into namespace __tbb_backend_details Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
…plementation Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
… two __parallel_stable_sort overloads into one and two implementation overloads Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
Signed-off-by: Sergey Kopienko <[email protected]>
SergeyKopienko
force-pushed
the
dev/skopienko/multiple_backends_prototype
branch
from
June 19, 2024 13:22
ef66673
to
43f3d72
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is only prototype for descussions.
The goal of this PR
The goal of this PR - redesign our host backends (
SERIAL
,TBB
,OMP
) :backend_tag
;How we trying to achieve these goals (the main idea):
oneapi::dpl::__backend
we declare common backend template structure:oneapi::dpl::__backend
for each of our host backends (SERIAL
,TBB
,OMP
) we create it's specializations:oneapi::dpl::__backend::__tbb_backend_details
,oneapi::dpl::__backend::__omp_backend_details
. These separate namespaces give guaranties to us that each backend implementation used their own implementation details.include/oneapi/dpl/pstl/parallel_backend.h
create/modify some useful template aliases:The usage of this approach in the code (examples):
// __backend_tag{} removed from arguments here __par_backend<__backend_tag>::__parallel_for(...);
If this approach looking good we are able to repack
device
andfpga
backend by the same way too, implementing them inside two additional hetero backend implementations: