-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Improve error diagnostic for invalid SYCL kernel name #4867
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
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
I do not think we can separate nested struct case used as kernel name and add a separate diagnostic for this.
Please let me know if i missed something. Any suggestion if the updated diagnostic message is not clear or too long? |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
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!
Thanks for the reviews everyone. |
According to SYCL 2020 spec:
The kernel name must be forward declarable at namespace scope (including global namespace scope) and may not be forward declared other than at namespace scope.
The use of nested struct-case (where the name IS globally visible but just not forward-declarable) in a SYCL kernel name currently generates invalid error message:
error: '{{.*}}' should be globally visible
This patch modifies the error diagnostic message when the kernel name is declared at non-namespace scope (i.e. Inside a function or class/struct).
Signed-off-by: Soumi Manna soumi.manna@intel.com