Skip to content

[SYCL] Reuse plugin information so that it's not copied when sycl::detail::plugin is copied #5049

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 7 commits into from
Dec 2, 2021

Conversation

s-kanaev
Copy link
Contributor

No description provided.

…tail::plugin is copied

Signed-off-by: Sergey Kanaev <[email protected]>
@s-kanaev s-kanaev requested review from smaslov-intel and a team as code owners November 30, 2021 09:05
@s-kanaev s-kanaev requested a review from romanovvlad November 30, 2021 09:06
@s-kanaev
Copy link
Contributor Author

s-kanaev commented Nov 30, 2021

@smaslov-intel , do you see any potential caveats here?

Signed-off-by: Sergey Kanaev <[email protected]>
Sergey Kanaev added 4 commits November 30, 2021 13:30
Signed-off-by: Sergey Kanaev <[email protected]>
Signed-off-by: Sergey Kanaev <[email protected]>
Signed-off-by: Sergey Kanaev <[email protected]>
@s-kanaev s-kanaev marked this pull request as draft December 1, 2021 09:09
@s-kanaev s-kanaev marked this pull request as ready for review December 1, 2021 13:42
@s-kanaev s-kanaev requested a review from romanovvlad December 1, 2021 13:42
@@ -236,7 +241,7 @@ class plugin {
std::shared_ptr<std::mutex> getPluginMutex() { return MPluginMutex; }

private:
RT::PiPlugin MPlugin;
std::shared_ptr<RT::PiPlugin> MPlugin;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we have one to one mapping between plugin and RT::PiPlugin and one to many between plugin and platform ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Though, adding such a change to this patch will make it more complex for review.
Shifting to 1-1 plugin-pi_plugin and 1-n plugin-platform is the next step.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we already have 1:many mapping to platforms at line 253?

Copy link
Contributor Author

@s-kanaev s-kanaev Dec 3, 2021

Choose a reason for hiding this comment

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

@smaslov-intel , there's such a mapping between sycl::detail::plugin and pi_platform. Though, I have an intent to add the same mapping for sycl::detail::plugin and sycl::detail::platform_impl as opposed to copying sycl::detail::plugin for each platform.

Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@romanovvlad romanovvlad merged commit 30cfe3e into intel:sycl Dec 2, 2021
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