-
Notifications
You must be signed in to change notification settings - Fork 787
[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
Conversation
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.
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!
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.
The test failure may need a restart. Not sure. |
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.
Small nit about diagnostic message which you can dismiss if you're not uploading a new patch for the lit failure.
Thanks for the reviews! I've got another patch coming to fix the requested changes in a few minutes. |
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.
LGTM, thanks
Co-authored-by: Alexey Bader <[email protected]>
53e3f54
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.
LGTM !
Signed-off-by: Lu, John <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@42788c2
add accidentally removed numactl from the benchmark job
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.