-
Notifications
You must be signed in to change notification settings - Fork 850
[SYCL] Restore the nd_range default constructor #22949
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
KornevNikita
merged 3 commits into
intel:sycl
from
arnavprabhu:fix/nd-range-default-constructor
Aug 25, 2026
+14
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On pytorch side we can't accept this solution in the release version of the compiler, neither closed source DPC++ nor open source dpclang. We need this resolved before the next release. Can you educate me what exactly is an issue to step out from the spec on this matter and continue to have
nd_rangedefault compiler defined?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvrogozh you mean you can't accept this macro? By the next release you mean 7.3.0? Because 7.2.0 will contain this ctor. I believe we'll resolve this by 7.3.0, this is just to unblock folks that need this right now.
@gmlueck do you think we can restore this right now without any guards? Note - we had it for a long time, but I removed it recently, so it won't be like adding a new API but rather restoring the existed one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pytorch stopped using preview macro long time ago and it was an effort dedicated to that due to Pytorch being production environment. And we don't want to introduce it again.
This solution is OK as intermediate engineering solution, but that's showstopper from my perspective for the next release which seems to be 7.3.0 per your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ctor is added under "if not defined INTEL_PREVIEW...", so it'll be available even in 7.3.0, but might be removed prior to 8.0.0. I believe we'll add it to SYCL 2020 or create a oneapi extension by this time.
Does it work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, ok, I misread the condition looking into the PR early morning. Then reformulating the concern, this PR is fine right now but gives a risk to the next major release 8.0.0 if you will decide to drop this ctor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not opposed to this change, but it might make sense to wait until later this week if there is no hurry. I'm hoping to bring KhronosGroup/SYCL-Docs#1043 up for discussing on Thursday of this week. If the Khronos WG decides to add the default constructor as an "errata" fix, then we won't need this PR at all. We can just keep the default constructor as it is now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this change intel/llvm pytorch CI is blocked. Longer it's broken more risk for other issues to appear unnoticed contributing to the triage bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm reading this PR wrong. I thought it was just removing the default constructor in
-fpreview-breaking-changesmode? There's no change at all in the regular mode, right?@dvrogozh, I think you said above that PyTorch doesn't use the
-fpreview-breaking-changesmode. If my understanding about this PR is correct, I don't think it will have any effect on PyTorch at all.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am talking about pytorch CI defined in this intel/llvm repository. You have a workflow which validates most recent builds of the dpclang compiler with the pytorch. See https://github.com/intel/llvm/blob/sycl/.github/workflows/sycl-pytorch-build-and-test.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand now. Sorry, I didn't read the PR description closely enough. I see now that this is undoing the recent change in #22908, which removed that default constructor.
Feel free to merge this PR now if you want. If the WG decides later to add the default constructor, we can make another PR to remove the
#ifndef.