-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Deprecate SYCL 1.2.1 device selectors #6599
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
Changes from all commits
9382328
f6db9fc
8d4dabe
1521dbb
269fa4b
e72b4d5
d07d8da
68f6bce
ef344c2
9f5a223
d7093a0
b132a74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ like in example below: | |
sycl::queue Queue; | ||
|
||
int main() { | ||
Queue = sycl::queue{sycl::default_selector{}.select_device()}; | ||
Queue = sycl::queue{sycl::default_selector_v}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example might not be best suited here anymore. Line 25 is also useless now as the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree about Line 25, but I think we should leave it. The whole text is about how you get undefined behavior when using global objects because the C++ standard does not specify creation/destruction order, and how the example seems syntactically correct, yet is still undefined behavior. If we remove 25 then the surrounding text isn't really making a point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is UB here now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the queue is created outside main. The "seems syntactically correct" part is declaring the queue outside main but initializing it inside main. If we remove line 25 there is no "seems syntactically correct" part. The example is intended to be intentionally wrong. Read the entire section and you'll see what I mean. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably the whole thing should be re-written, but that's outside the scope of this PR. I'm just trying to bring the example up to date, not address its overall point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't think it's true. We do create and define a queue outside main. Then we override the value inside the variable with another one, while the original is being destroyed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct. but to make that point, we need to keep line 25. This isn't real code, this is documentation talking about global object usage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still, where is UB? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First sentence. And first sentence after the code snippet. |
||
|
||
return 0; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.