File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed
torch/csrc/api/include/torch Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ requirements:
26
26
about :
27
27
home : https://github.com/pytorch/pytorch
28
28
license : BSD
29
- summary : A TENsor library for C++14
29
+ summary : A TENsor library for C++17
30
30
31
31
extra :
32
32
recipe-maintainers :
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
- #if !defined(_MSC_VER ) && __cplusplus < 201402L
4
- #error C++14 or later compatible compiler is required to use ATen.
3
+ #if !defined(_MSC_VER ) && __cplusplus < 201703L
4
+ #error C++17 or later compatible compiler is required to use ATen.
5
5
#endif
6
6
7
7
#include <ATen/Context.h>
Original file line number Diff line number Diff line change @@ -121,9 +121,9 @@ endif()
121
121
if (UNIX )
122
122
add_definitions (-DUSE_PTHREAD )
123
123
124
- check_cxx_compiler_flag ("-std=c++14" SUPPORTS_STDCXX14 )
125
- if (SUPPORTS_STDCXX14 )
126
- set (CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS} " )
124
+ check_cxx_compiler_flag ("-std=c++17" SUPPORTS_STDCXX17 )
125
+ if (SUPPORTS_STDCXX17 )
126
+ set (CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS} " )
127
127
endif ()
128
128
129
129
check_cxx_compiler_flag ("-mrtm -Werror" SUPPORTS_MRTM )
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.0)
2
2
find_package (ATen REQUIRED )
3
3
include_directories (${ATEN_INCLUDE_DIR} )
4
4
5
- # C++14
5
+ # C++17
6
6
if (not MSVC )
7
- set (CMAKE_CXX_FLAGS "--std=c++14 ${CMAKE_CXX_FLAGS} " )
7
+ set (CMAKE_CXX_FLAGS "--std=c++17 ${CMAKE_CXX_FLAGS} " )
8
8
endif ()
9
9
add_executable (main main.cpp )
10
10
target_link_libraries (main ${ATEN_LIBRARIES} )
Original file line number Diff line number Diff line change 22
22
" You're trying to build PyTorch with a too old version of Clang. We need Clang 4 or later."
23
23
#endif
24
24
25
- #if (defined(_MSC_VER) && (!defined(_MSVC_LANG) || _MSVC_LANG < 201402L )) || \
26
- (!defined(_MSC_VER) && __cplusplus < 201402L )
27
- #error You need C++14 to compile PyTorch
25
+ #if (defined(_MSC_VER) && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L )) || \
26
+ (!defined(_MSC_VER) && __cplusplus < 201703L )
27
+ #error You need C++17 to compile PyTorch
28
28
#endif
29
29
30
30
#if defined(_WIN32) && (defined(min) || defined(max))
Original file line number Diff line number Diff line change 1
1
# An ATen operator for Caffe2
2
2
3
3
ATen is a simple tensor library thats exposes the Tensor operations in Torch
4
- and PyTorch directly in C++14 . This library provides a generated wrapper around the ATen API
4
+ and PyTorch directly in C++17 . This library provides a generated wrapper around the ATen API
5
5
that makes these functions available in Caffe2 as an operator. It also makes it accessible using the
6
6
ToffeeIR.
7
7
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
- #if !defined(_MSC_VER ) && __cplusplus < 201402L
4
- #error C++14 or later compatible compiler is required to use PyTorch.
3
+ #if !defined(_MSC_VER ) && __cplusplus < 201703L
4
+ #error C++17 or later compatible compiler is required to use PyTorch.
5
5
#endif
6
6
7
7
#include <torch/autograd.h>
You can’t perform that action at this time.
0 commit comments