Skip to content

[NFC][SYCL] Simplify the error checking of arrays by only visiting 1x. #2344

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 6 commits into from
Aug 20, 2020

Conversation

erichkeane
Copy link
Contributor

The current visitor requires that we go through our diagnostics checkers
once per element. This is expensive, so this patch makes it an opt-out
as to whether we should visit each element, or only the 1st.

Erich Keane added 2 commits August 19, 2020 07:53
Just a cleanup task I saw that should happen.  None of this is really
necessary to be public, so make them all private.
The current visitor requires that we go through our diagnostics checkers
once per element.  This is expensive, so this patch makes it an opt-out
as to whether we should visit each element, or only the 1st.
@erichkeane
Copy link
Contributor Author

Please forgive there being two commits, the first is covered in this review: #2345

@erichkeane
Copy link
Contributor Author

I've now merged this with the dependent patch, so the 'diff' is now correct.

Copy link
Contributor

@Fznamznon Fznamznon left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@bader bader merged commit c709986 into intel:sycl Aug 20, 2020
for (int64_t Count = 0; Count < ElemCount; Count++) {
VisitElement(nullptr, FD, ET, handlers...);

assert(ElemCount > 0 && "SYCL prohibits 0 sized arrays");
Copy link
Contributor

Choose a reason for hiding this comment

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

So, you crash the compiler when a user uses a array of size 0?
And what when not compiled with assertions?
What if this happens by meta-programming on a kernel which is not executed anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We prohibit size-zero arrays. If the user attempts to use a size-zero array in a kernel, they get a diagnostic.

kbenzie pushed a commit to kbenzie/intel-llvm that referenced this pull request Feb 17, 2025
…ported

[CTS] Skip images and fill2D tests if feature is not supported
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
[CTS] Skip images and fill2D tests if feature is not supported
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.

4 participants