Skip to content

add standalone_debug attribute to sycl::device class #19059

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

Draft
wants to merge 2 commits into
base: sycl
Choose a base branch
from

Conversation

ykhatav
Copy link
Contributor

@ykhatav ykhatav commented Jun 18, 2025

A debug info optimization, known as "constructor homing," is enabled by default and omits debug information for certain constructors based on their characteristics. For the sycl::device class, the constructor is neither a copy/move constructor nor deleted, and is non-trivial, resulting in the omission of its debug information.
This omission causes the pretty printer to fail, as it requires the debug information to display essential details such as types and device names. To resolve this, the pull request introduces the standalone_debug attribute to the sycl::device class, ensuring that debug information is always emitted for this class.
While this change successfully addresses the pretty printer issue, it may lead to debug information being present in every compilation unit, potentially affecting code size. Testing with existing SYCL tests shows that the code size impact is relatively small, with increases ranging from approximately 0.6% to 1.5% in most cases.

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.

1 participant