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

Toolset update: VS 2022 17.3 Preview 2, CUDA 11.6.0 #2791

Merged
merged 15 commits into from
Jun 16, 2022

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Jun 15, 2022

This updates the toolset to:

  • VS 2022 17.3 Preview 2.
    • Required in the README, but not in <yvals_core.h> because the internal build still uses 19.32.
  • CMake 3.23.
    • Required in the README and CMakeLists.txt.
  • Python 3.10.5.
    • We still require Python 3.9 because the VS Installer still has 3.9.7.
  • CUDA 11.6.0.
    • azure-devops/provision-image.ps1 now installs all CUDA features, which is much easier than enumerating almost all of them.
    • Required in <yvals_core.h>.
      • CUDA 11.6.0 was the first release that officially supported VS 2022, so this aligns our support.
      • Approved by our boss and double boss, who are awesome! 😸

Then we can remove workarounds:

  • tests/std/tests/GH_000639_nvcc_include_all/env.lst
    • Drop --allow-unsupported-compiler, now that we're using a CUDA-supported scenario.
  • tests/std/tests/P1502R1_standard_library_header_units/test.cpp
    • Remove workarounds for VSO-1496084 "Standard Library Header Units: Splitting <chrono> emits fatal error C1116: unrecoverable error importing header unit '<chrono>'".
  • Remove workarounds for VSO-1269037 "Compiler ICE on reference to pointer in constexpr".
    • <vector> 2051-2056: This is clearer with the workaround as _Temp is used repeatedly, but we can extract it.
    • <vector> 3282: This is clearer with the workaround as _Temp is used repeatedly.
    • <xmemory> 1212: Remove the workaround as _Temp is used only once.
    • <xmemory> 1233-1236: The original code used pointers-to-pointers, which were difficult to read. The workaround was significantly clearer, but still had subtle behavior - it was writing to auto& _Pnext repeatedly, ultimately nulling it out (so the separate assignment was redundant). As @CaseyCarter observed, we can avoid the subtlety by using exchange() to null out _Myproxy->_Myfirstiter immediately, and then the rest of the loop can use a non-reference variable.
  • <format>
    • Remove workaround for VSO-1444086 "consteval + /presetPadding error".
  • Remove workarounds for internal test machines running older OSes.
    • There is a slight chance that I'll need to drop this (I am informed that the PR/CI system upgrade to "1ES Phase 5" makes this unnecessary, but we may still want/need to retain this for the internal Contest pool).
  • <yvals_core.h>
  • CMakeLists.txt
    • Change /d1FastFail to /fastfail. This is documented by cl /?, and was added in VS 2019 16.1 by MSVC-PR-162175.

I am planning a followup PR to address #1301 by removing _HAS_CONDITIONAL_EXPLICIT now that CUDA 11.6.0 supports it; this should be separate because the change is large and may need to be reverted.

StephanTLavavej and others added 14 commits June 14, 2022 17:21
"Standard Library Header Units: Splitting `<chrono>` emits fatal error
C1116: unrecoverable error importing header unit `'<chrono>'`"
"Compiler ICE on reference to pointer in constexpr"

vector ~2048: This is clearer with the workaround as _Temp is used repeatedly, but we can extract it.

vector ~3279: This is clearer with the workaround as _Temp is used repeatedly.

xmemory ~1209: Remove the workaround as _Temp is used only once.

xmemory ~1230: This is significantly clearer with the workaround, so make it permanent. (The workaround used `auto& _Pnext`, whereas the original code used pointers-to-pointers.)
The perma-workaround loop makes this clear; it was very subtle in the original loop.
Related to GH 2658; MSVC-PR-391437 added this to VCRuntime.
This is documented by `cl /?`, and was added in 16.1 by MSVC-PR-162175.
@StephanTLavavej StephanTLavavej added the infrastructure Related to repository automation label Jun 15, 2022
@StephanTLavavej StephanTLavavej marked this pull request as ready for review June 15, 2022 11:28
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner June 15, 2022 11:28
stl/inc/xmemory Outdated Show resolved Hide resolved
Co-authored-by: Casey Carter <[email protected]>
@StephanTLavavej StephanTLavavej self-assigned this Jun 15, 2022
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to repository automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants