-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Move function pointer diagnostics to BuildResolvedCallExpr #16987
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
[SYCL] Move function pointer diagnostics to BuildResolvedCallExpr #16987
Conversation
The patch moves the function pointer related diagnostics from DiagDeviceFunction::VisitCallExpr class to BuildResolvedCallExpr and use a delayed diagnostic. This allow the compiler to provide the template instantiation trace when emitting the diagnostic.
What diagnostics are possible with this change that weren't possible before? Please add test case showing them. |
It just didn't display the instantiation stack, making things difficult to understand where it was coming from. Updated test to check the note emission. |
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.
That is a nice improvement! Could you please also check that the error is not emitted from the host code? Delayed diagnostics can be buggy.
Sure, I added a |
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.
Thanks!
@premanandrao do you have comments on the PR ? |
ping @premanandrao |
@intel/llvm-gatekeepers I believe this ready (comments addressed and PR approved) |
@Naghasan This is also causing issues for llama.cpp. They pass function pointers as a template parameter and this triggers an error after this patch. See here: https://github.com/ggml-org/llama.cpp/blob/master/ggml/src/ggml-sycl/mmq.cpp#L1196 |
No, that's a bug in our implementation. KhronosGroup/SYCL-Docs#388 explicitly allowed that code. |
well it is, clang lit works but there is clearly holes in them |
Can you clarify what you mean? CTS failure is real and not a test issue. |
Also, like @igchor said llama.cpp, which we use for performance testing, no longer compiles after this PR. |
there is coverage in clang's tests :) working on a fix BTW |
The patch moves the function pointer related diagnostics from DiagDeviceFunction::VisitCallExpr class to BuildResolvedCallExpr and use a delayed diagnostic.
This allow the compiler to provide the template instantiation trace when emitting the diagnostic.