pytorch/cmake
Nikita Shulga 36ac095ff8 Migrate PyTorch to C++17 (#85969)
With CUDA-10.2 gone we can finally do it!

This PR mostly contains build system related changes, invasive functional ones are to be followed.
Among many expected tweaks to the build system, here are few unexpected ones:
 - Force onnx_proto project to be updated to C++17 to avoid `duplicate symbols` error when compiled by gcc-7.5.0, as storage rule for `constexpr` changed in C++17, but gcc does not seem to follow it
 - Do not use `std::apply` on CUDA but rely on the built-in variant, as it results in test failures when CUDA runtime picks host rather than device function when `std::apply` is invoked from CUDA code.
 - `std::decay_t` -> `::std::decay_t` and `std::move`->`::std::move` as VC++ for some reason claims that `std` symbol is ambigious
 - Disable use of `std::aligned_alloc` on Android, as its `libc++` does not implement it.

Some prerequisites:
 - https://github.com/pytorch/pytorch/pull/89297
 - https://github.com/pytorch/pytorch/pull/89605
 - https://github.com/pytorch/pytorch/pull/90228
 - https://github.com/pytorch/pytorch/pull/90389
 - https://github.com/pytorch/pytorch/pull/90379
 - https://github.com/pytorch/pytorch/pull/89570
 - https://github.com/facebookincubator/gloo/pull/336
 - https://github.com/facebookincubator/gloo/pull/343
 - 919676fb32

Fixes https://github.com/pytorch/pytorch/issues/56055

Pull Request resolved: https://github.com/pytorch/pytorch/pull/85969
Approved by: https://github.com/ezyang, https://github.com/kulinseth
2022-12-08 02:27:48 +00:00
..
External Set make max load when building libtorch (#89237) 2022-11-18 18:55:33 +00:00
Modules build: support DNNL_GRAPH_CPU_RUNTIME=TBB (#87512) 2022-10-25 19:24:38 +00:00
Modules_CUDA_fix Hopper (sm90) support (#87736) 2022-11-09 01:49:50 +00:00
public Migrate PyTorch to C++17 (#85969) 2022-12-08 02:27:48 +00:00
Allowlist.cmake
BuildVariables.cmake
Caffe2Config.cmake.in Revert "Use FindCUDAToolkit to find cuda dependencies (#82695)" 2022-10-11 02:50:47 +00:00
Caffe2ConfigVersion.cmake.in
cmake_uninstall.cmake.in
Codegen.cmake [retake2][mobile] Fix lightweight dispatch OOM error by introducing selective build (#80791) 2022-07-15 18:04:25 +00:00
DebugHelper.cmake
Dependencies.cmake Migrate PyTorch to C++17 (#85969) 2022-12-08 02:27:48 +00:00
FlatBuffers.cmake [pytorch][PR] Add ability for a mobile::Module to save as flatbuffer (#70201) 2022-01-12 16:30:39 -08:00
GoogleTestPatch.cmake
IncludeSource.cpp.in CMake: Include instead of copying cpu kernel files (#67656) 2021-11-30 19:13:53 -08:00
iOS.cmake
Metal.cmake
MiscCheck.cmake
ProtoBuf.cmake
ProtoBufPatch.cmake Migrate PyTorch to C++17 (#85969) 2022-12-08 02:27:48 +00:00
Summary.cmake Introduce TORCH_DISABLE_GPU_ASSERTS (#84190) 2022-11-04 04:43:05 +00:00
TorchConfig.cmake.in reorder cpuinfo and clog deps in TorchConfig.cmake (#79551) 2022-06-16 18:23:26 +00:00
TorchConfigVersion.cmake.in
VulkanCodegen.cmake make vulkan codegen windows-compatible (#85241) 2022-09-26 15:13:24 +00:00
VulkanDependencies.cmake