Skip to content
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

Don't assume _HAS_CONDITIONAL_EXPLICIT for __INTEL_COMPILER #424

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented Jan 15, 2020

Description

This change is not a statement of support for the Intel C++ compiler by the STL, so much as an attempt to not break it gratuitously.

Fixes DevCom-744112.

[This is a dual of the internal MSVC-PR-223228.]

Checklist

Be sure you've read README.md and understand the scope of this repo.

If you're unsure about a box, leave it unchecked. A maintainer will help you.

  • Identifiers in product code changes are properly _Ugly as per
    https://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
  • The STL builds successfully and all tests have passed (must be manually
    verified by an STL maintainer before automated testing is enabled on GitHub,
    leave this unchecked for initial submission).
  • These changes introduce no known ABI breaks (adding members, renaming
    members, adding virtual functions, changing whether a type is an aggregate
    or trivially copyable, etc.).
  • These changes were written from scratch using only this repository,
    the C++ Working Draft (including any cited standards), other WG21 papers
    (excluding reference implementations outside of proposed standard wording),
    and LWG issues as reference material. If they were derived from a project
    that's already listed in NOTICE.txt, that's fine, but please mention it.
    If they were derived from any other project (including Boost and libc++,
    which are not yet listed in NOTICE.txt), you must mention it here,
    so we can determine whether the license is compatible and what else needs
    to be done.

This change is not a statement of support for the Intel C++ compiler by the STL, so much as an attempt to not break it gratuitously.

Fixes DevCom-744112.
@CaseyCarter CaseyCarter requested a review from a team as a code owner January 15, 2020 21:30
#elif defined(__clang__)
#define _HAS_CONDITIONAL_EXPLICIT 0 // TRANSITION, LLVM-42694
#else // vvv C1XX or non-CUDA EDG vvv
#elif defined(__clang__) || defined(__CUDACC__) || defined(__INTEL_COMPILER)
Copy link
Member Author

@CaseyCarter CaseyCarter Jan 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is untested, I got __INTEL_COMPILER from the documentation of Intel's C++ compiler. If someone out there has a Windows install of ICC handy and could throw this at it I'd be obliged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine given our support level for ICC.

@CaseyCarter CaseyCarter self-assigned this Jan 15, 2020
@BillyONeal
Copy link
Member

I'm super uncomfortable trying to support a compiler that we neither support nor test.

@CaseyCarter
Copy link
Member Author

I'm super uncomfortable trying to support a compiler that we neither support nor test.

I think you mean "trying to not gratuitously break a compiler that we neither support nor test" ;)

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this change is reasonable. While this doesn't change our policy (we neither test nor support ICC), this has near-zero cost and significant benefits for the customers who reported it. The cost is near-zero because we're going to need the fallback codepath for a while (we expect CUDA to follow C1XX's new behavior of unconditionally supporting explicit(bool), but it'll take longer for us to increase our minimum required CUDA version).

However, when we no longer need the fallback for CUDA, I'll want the fallback code to be removed outright - so ICC should implement this cross-vendor behavior in order to continue imitating MSVC.

@BillyONeal
Copy link
Member

I'm super uncomfortable trying to support a compiler that we neither support nor test.

I think you mean "trying to not gratuitously break a compiler that we neither support nor test" ;)

No, I mean support. This is support. We would be incorrect to resolve the DevCom issue without at least smoke testing that icc works, since it's been broken for ~4 releases now it's likely there are other compiler bugs lurking.

I believe that this change is reasonable.

I agree that it is reasonable; I have no objections to the change per se, but I would have objections to resolving the DevCom issue without verifying that ICC does in fact work.

@CaseyCarter
Copy link
Member Author

However, when we no longer need the fallback for CUDA, I'll want the fallback code to be removed outright - so ICC should implement this cross-vendor behavior in order to continue imitating MSVC.

FWIW, I did try to make this clear in my response on DevCom: We'll make this small change to avoid assuming that ICC has conditional explicit in sub-c++20 mode, but will break it again without apology when the compilers we do support no longer need the fallback code paths.

but I would have objections to resolving the DevCom issue without verifying that ICC does in fact work

Whether or not ICC does in fact work is not our problem: we have never claimed it works, and that position isn't changing.

@CaseyCarter CaseyCarter merged commit e36c3bf into microsoft:master Jan 17, 2020
@CaseyCarter CaseyCarter deleted the explicit branch January 17, 2020 20:53
@CaseyCarter CaseyCarter removed their assignment Jun 27, 2020
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