Skip to content

Commit 4fd16dd

Browse files
malfetpytorchmergebot
authored andcommitted
Clarify that libtorch API is C++17 compatible (pytorch#136471)
As it relies on some common C++17 primitives, such as `std::optional` Replace all docs references from C++14 to C++17 Fixes pytorch#133205 Pull Request resolved: pytorch#136471 Approved by: https://github.com/kit1980, https://github.com/atalman
1 parent e4d2942 commit 4fd16dd

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

RELEASE.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@
4848

4949
Following is the Release Compatibility Matrix for PyTorch releases:
5050

51-
| PyTorch version | Python | Stable CUDA | Experimental CUDA | Stable ROCm |
52-
| --- | --- | --- | --- | --- |
53-
| 2.5 | >=3.9, <=3.12, (3.13 experimental) | CUDA 11.8, CUDA 12.1, CUDA 12.4, CUDNN 9.1.0.70 | None | ROCm 6.2 |
54-
| 2.4 | >=3.8, <=3.12 | CUDA 11.8, CUDA 12.1, CUDNN 9.1.0.70 | CUDA 12.4, CUDNN 9.1.0.70 | ROCm 6.1 |
55-
| 2.3 | >=3.8, <=3.11, (3.12 experimental) | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 6.0 |
56-
| 2.2 | >=3.8, <=3.11, (3.12 experimental) | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 5.7 |
57-
| 2.1 | >=3.8, <=3.11 | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 5.6 |
58-
| 2.0 | >=3.8, <=3.11 | CUDA 11.7, CUDNN 8.5.0.96 | CUDA 11.8, CUDNN 8.7.0.84 | ROCm 5.4 |
59-
| 1.13 | >=3.7, <=3.10 | CUDA 11.6, CUDNN 8.3.2.44 | CUDA 11.7, CUDNN 8.5.0.96 | ROCm 5.2 |
60-
| 1.12 | >=3.7, <=3.10 | CUDA 11.3, CUDNN 8.3.2.44 | CUDA 11.6, CUDNN 8.3.2.44 | ROCm 5.0 |
51+
| PyTorch version | Python | C++ | Stable CUDA | Experimental CUDA | Stable ROCm |
52+
| --- | --- | --- | --- | --- | --- |
53+
| 2.5 | >=3.9, <=3.12, (3.13 experimental) | C++17 | CUDA 11.8, CUDA 12.1, CUDA 12.4, CUDNN 9.1.0.70 | None | ROCm 6.2 |
54+
| 2.4 | >=3.8, <=3.12 | C++17 | CUDA 11.8, CUDA 12.1, CUDNN 9.1.0.70 | CUDA 12.4, CUDNN 9.1.0.70 | ROCm 6.1 |
55+
| 2.3 | >=3.8, <=3.11, (3.12 experimental) | C++17 | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 6.0 |
56+
| 2.2 | >=3.8, <=3.11, (3.12 experimental) | C++17 | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 5.7 |
57+
| 2.1 | >=3.8, <=3.11 | C++17 | CUDA 11.8, CUDNN 8.7.0.84 | CUDA 12.1, CUDNN 8.9.2.26 | ROCm 5.6 |
58+
| 2.0 | >=3.8, <=3.11 | C++14 | CUDA 11.7, CUDNN 8.5.0.96 | CUDA 11.8, CUDNN 8.7.0.84 | ROCm 5.4 |
59+
| 1.13 | >=3.7, <=3.10 | C++14 | CUDA 11.6, CUDNN 8.3.2.44 | CUDA 11.7, CUDNN 8.5.0.96 | ROCm 5.2 |
60+
| 1.12 | >=3.7, <=3.10 | C++14 | CUDA 11.3, CUDNN 8.3.2.44 | CUDA 11.6, CUDNN 8.3.2.44 | ROCm 5.0 |
6161

6262
## Release Cadence
6363

cmake/MiscCheck.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CAFFE2_USE_EXCEPTION_PTR 1)
77
# ---[ Check if we want to turn off deprecated warning due to glog.
88
if(USE_GLOG)
99
cmake_push_check_state(RESET)
10-
set(CMAKE_REQUIRED_FLAGS "-std=c++14")
10+
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
1111
CHECK_CXX_SOURCE_COMPILES(
1212
"#include <glog/stl_logging.h>
1313
int main(int argc, char** argv) {

docs/cpp/source/frontend.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The C++ Frontend
22
================
33

4-
The PyTorch C++ frontend is a C++14 library for CPU and GPU
4+
The PyTorch C++ frontend is a C++17 library for CPU and GPU
55
tensor computation, with automatic differentiation and high level building
66
blocks for state of the art machine learning applications.
77

docs/cpp/source/notes/tensor_basics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Tensor Basics
22
=============
33

44
The ATen tensor library backing PyTorch is a simple tensor library that exposes
5-
the Tensor operations in Torch directly in C++14. ATen's API is auto-generated
5+
the Tensor operations in Torch directly in C++17. ATen's API is auto-generated
66
from the same declarations PyTorch uses so the two APIs will track each other
77
over time.
88

ios/LibTorch-Lite-Nightly.podspec.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.user_target_xcconfig = {
2626
'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/include/"',
2727
'OTHER_LDFLAGS' => '-force_load "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/lib/libtorch.a" -force_load "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/lib/libtorch_cpu.a"',
28-
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
28+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
2929
'CLANG_CXX_LIBRARY' => 'libc++'
3030
}
3131
s.pod_target_xcconfig = {

ios/LibTorch.podspec.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.user_target_xcconfig = {
2626
'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch/install/include/"',
2727
'OTHER_LDFLAGS' => '-force_load "$(PODS_ROOT)/LibTorch/install/lib/libtorch.a" -force_load "$(PODS_ROOT)/LibTorch/install/lib/libtorch_cpu.a"',
28-
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
28+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
2929
'CLANG_CXX_LIBRARY' => 'libc++'
3030
}
3131
s.pod_target_xcconfig = {

0 commit comments

Comments
 (0)