Skip to content

[SYCL] Move deferred emit check to after "Can be emitted" checks. #2102

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 4 commits into from
Jul 14, 2020

Conversation

erichkeane
Copy link
Contributor

The previous implementation caused function declarations to be attempted
to be emitted if they were required to be emitted (such as in the case
of -femit-all-decls), which caused a crash.

This patch moves the check until after the 'can be emitted' checks for
function/var decls, and limits it to only functions that are
sycl-devices (or, in the case of implicit attributes, called from a
sycl-device function).

The previous implementation caused function declarations to be attempted
to be emitted if they were required to be emitted (such as in the case
of -femit-all-decls), which caused a crash.

This patch moves the check until after the 'can be emitted' checks for
function/var decls, and limits it to only functions that are
sycl-devices (or, in the case of implicit attributes, called from a
sycl-device function).
premanandrao
premanandrao previously approved these changes Jul 13, 2020
premanandrao
premanandrao previously approved these changes Jul 13, 2020
@erichkeane
Copy link
Contributor Author

I don't really understand the test failures, but I've relaxed the check a little to be over-kill like it was before. Hopefully this will fix the SYCL test.

My look at the SYCL test failure showed that the symbol was only emitted from the CFE 1x, so its not clear why the linking process thinks there are multiples.

@bader bader merged commit ce2b59c into intel:sycl Jul 14, 2020
jsji pushed a commit that referenced this pull request Aug 11, 2023
It's duplicating existing information in the SPIR-V and it has complex structure.

Signed-off-by: Sarnie, Nick <[email protected]>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@d498f48
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.

3 participants