-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][OpenMP] Correctly handle __bf16 intrinsics using deferred diagnostics #8116
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 uses existing deferred diagnostics framework to emit error for unsupported type __bf16 in device code. Error is not emitted in host code. Differential Revision: https://reviews.llvm.org/D141375
Please, follow https://github.com/intel/llvm/blob/sycl/CONTRIBUTING.md#pull-request recommendations for PR decoration. E.g. PR title "Correctly handle __bf16 intrinsics using deferred diagnostics" -> "[SYCL][OpenMP] Use deferred diagnostics to handle __bf16". |
@intel/llvm-gatekeepers this patch is ready for review and merge. Failing test is unrelated to this PR |
Failed Tests (1): |
__bf16 var; // expected-note {{'var' defined here}} | ||
kernel<class variables>([=]() { | ||
(void)var; // expected-error {{'var' requires 16 bit size '__bf16' type support, but target 'spir64' does not support it}} | ||
int B = sizeof(__bf16); |
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.
(Sorry, this is late. My notifications weren't working.)
Maybe a nit. Why is this declaration of B needed? Or is this showing that it does not get a diagnostic?
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.
Yes I added it to show we don't get a diagnostic when used in unevaluated context
Commits 1 and 2 are cherry-picks from llvm.org - https://reviews.llvm.org/D141375 and https://reviews.llvm.org/rGc10615e4a94fc8dec65a48a6eb8f7efccc3fb1fc.
Commit 3 reverts header changes made in intel/llvm.