Skip to content

[SYCL]Move kernel diagnostics to the call, enable template trail on errors #2289

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 12, 2020

Conversation

erichkeane
Copy link
Contributor

@erichkeane erichkeane commented Aug 10, 2020

This patch moves the diagnostics for the kernel to the point in which the
kernel is called, rather than when generating the kernel. This means that
the call location is available (so that the checkers can be taught how to print
better diagnostics in the future). The biggest impact of this, is that it
causes us to print the template instantiation 'tree' since these are diagnosing
right away.

Currently, this uses the call location to better diagnose the lambda check (see
the additional note there!), and prints a kernel-parameter-must-be-lambda-or-functor
error.

This patch is a WIP that intends to move the diagnostics for a kernel to
the point in which it is called for the first time. This should give us
access to the actual call location (AND provide for diagnostics up an
instantiation tree) to provide bettter feedback to the user.

Currently, this doesn't actually add the call location anywhere (except
it moves the 'lambda' capture check to the call location, perhaps
incorrectly).

Additionally, this patch doesn't pass accessor-type-diagnostics for some
reason, so I still need to look into that.

Finally, this starts diagnosing that the kernel isn't a cxx-record-decl,
since that is in violation of the spec at the moment.

Also note there are a couple of TODOs I have to look into.
@erichkeane
Copy link
Contributor Author

Note this is WIP, but I wanted to make sure @cperkinsintel , @srividya-sundaram and @Fznamznon saw it, since it is the result of a different discussion. It also changes depending on whether this goes before #2259

Everything should be back to how it was!
@erichkeane erichkeane changed the title [SYCL][WIP] Move kernel diagnostics to the call [SYCL]Move kernel diagnostics to the call, enable template trial on errors Aug 11, 2020
@erichkeane erichkeane changed the title [SYCL]Move kernel diagnostics to the call, enable template trial on errors [SYCL]Move kernel diagnostics to the call, enable template trail on errors Aug 11, 2020
@erichkeane
Copy link
Contributor Author

This should be ready for review now! Depending on the order of the union-fix (#2285) and @cperkinsintel 's re-submit (#2259) there will be a touch more work for the ones that come later.

No longer necessary, since I opted to get the kernel function anyway.
That said, I still think it is less awkward to use the getParamDecl
function instead of a dereferenced param_begin.
premanandrao
premanandrao previously approved these changes Aug 11, 2020
@premanandrao
Copy link
Contributor

The test failure may need a restart. Not sure.

Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

Small nit about diagnostic message which you can dismiss if you're not uploading a new patch for the lit failure.

@erichkeane
Copy link
Contributor Author

Thanks for the reviews! I've got another patch coming to fix the requested changes in a few minutes.

Fznamznon
Fznamznon previously approved these changes Aug 12, 2020
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

@erichkeane erichkeane dismissed stale reviews from elizabethandrews and Fznamznon via 53e3f54 August 12, 2020 14:44
Copy link
Contributor

@cperkinsintel cperkinsintel left a comment

Choose a reason for hiding this comment

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

LGTM !

@bader bader merged commit c767edc into intel:sycl Aug 12, 2020
jsji pushed a commit that referenced this pull request Jan 11, 2024
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
add accidentally removed numactl from the benchmark job
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