Skip to content

[SYCL] Allocate SubmissionInfo completely on stack #18314

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

Conversation

Alexandr-Konovalov
Copy link
Contributor

@Alexandr-Konovalov Alexandr-Konovalov commented May 5, 2025

Move SubmissionInfo to versioned public header and allocate it completely on stack.

Move SubmissionInfo to versioned public header and allocate it
complitely on stack.

Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
@Alexandr-Konovalov Alexandr-Konovalov marked this pull request as ready for review May 7, 2025 08:45
@Alexandr-Konovalov Alexandr-Konovalov requested a review from a team as a code owner May 7, 2025 08:45
@steffenlarsen steffenlarsen changed the title [SYCL] Allocate SubmissionInfo complitely on stack [SYCL] Allocate SubmissionInfo completely on stack May 7, 2025
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Co-authored-by: Steffen Larsen <steffen.larsen@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

Co-authored-by: Sergey Semenov <sergey.semenov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
@vinser52 vinser52 requested a review from sergey-semenov May 8, 2025 15:22
@Alexandr-Konovalov
Copy link
Contributor Author

ThreadSanitizer/check_device_global.cpp failure seems unrelated to the PR, see #18349 .

@vinser52
Copy link
Contributor

vinser52 commented May 8, 2025

@intel/llvm-gatekeepers the PR is ready to merge

@sarnex sarnex merged commit 75aa60c into intel:sycl May 8, 2025
18 of 19 checks passed
Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

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

I also doubt that this approach would work well for non-NFC ABI-breaking changes (e.g. adding new fields or removing old ones). Providing old versions without those new fields could be troublesome, unless all of them are actually optional.

@@ -95,6 +96,60 @@ class __SYCL_EXPORT SubmissionInfo {
private:
std::shared_ptr<SubmissionInfoImpl> impl = nullptr;
};
#endif

namespace v1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This way one particular data structure claims entire sycl::detail::vN namespace, so that we can't use the same approach for other APIs (that's the same reason why I think our sycl::_v1 turned out to be rather useless). IMO, it would be better to have detail::submission_info::_v1::SubmissionInfo or something like that. Maybe make submission_info inline itself.

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.

6 participants