Skip to content

[SYCL] Fix macro in device library function declaration to distinguis… #1324

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 1 commit into from
Mar 24, 2020

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Mar 16, 2020

…h std libraries

Signed-off-by: gejin [email protected]

@jinge90 jinge90 requested review from s-kanaev and asavonic March 16, 2020 04:58
@jinge90 jinge90 requested a review from bader March 17, 2020 02:41
@romanovvlad
Copy link
Contributor

@jinge90 What is the problem with current macro?

@jinge90
Copy link
Contributor Author

jinge90 commented Mar 18, 2020

@jinge90 What is the problem with current macro?

Hi, Vlad. As our compiler are based on LLVM , so:
"if defined(GNUC) || defined(clang)" will always be true as clang will always be defined
and "elif defined(_MSC_VER)" will always be false as only _MSC_VER is a Microsoft CL compiler's macro telling its version. Current code will lead to std::assert building failure on Windows.
Thank you very much.

@jinge90 jinge90 requested a review from romanovvlad March 19, 2020 11:01
@romanovvlad
Copy link
Contributor

@jinge90 What is the problem with current macro?

Hi, Vlad. As our compiler are based on LLVM , so:
"if defined(GNUC) || defined(clang)" will always be true as clang will always be defined
and "elif defined(_MSC_VER)" will always be false as only _MSC_VER is a Microsoft CL compiler's macro telling its version. Current code will lead to std::assert building failure on Windows.
Thank you very much.

I see. I would like @asavonic to approve.

@bader bader merged commit 0203c6c into intel:sycl Mar 24, 2020
@jinge90 jinge90 deleted the fix_redeclaration_of_devicelib_function branch April 2, 2020 01:13
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.

4 participants