Skip to content

Commit 6639bcc

Browse files
authored
TensorFlow June pin update & PyTorch/XLA c++17 migration (follow up) (#3794)
* adding tf pin * moving tf pin to a week back when tf had a successful pin - jun 22 * pin update, some debug prints - to remove later * moved pytorch/xla to c++17 * adding torch pin for testing * adding torch pin for testing * adding torch pin for testing * adding c++17 to CMakeLists.txt * removed torch pin * removing the environment variable * type * moving back to -Wno-c++11-narrowing * trying both c++11 and c++14 narrowing
1 parent 48bf0fd commit 6639bcc

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

build_torch_xla_libs.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ if [[ ! -z "$BAZEL_JOBS" ]]; then
5454
MAX_JOBS="--jobs=$BAZEL_JOBS"
5555
fi
5656

57-
OPTS+=(--cxxopt="-std=c++14")
57+
OPTS+=(--cxxopt="-std=c++17")
5858
if [[ $(basename -- $CC) =~ ^clang ]]; then
5959
OPTS+=(--cxxopt="-Wno-c++11-narrowing")
60+
OPTS+=(--cxxopt="-Wno-c++14-narrowing")
6061
fi
6162

6263
if [[ "$XLA_CUDA" == "1" ]]; then

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def make_relative_rpath(path):
303303

304304

305305
extra_compile_args = [
306-
'-std=c++14',
306+
'-std=c++17',
307307
'-Wno-sign-compare',
308308
'-Wno-deprecated-declarations',
309309
'-Wno-return-type',

test/cpp/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ ExternalProject_Add(
4343
CMAKE_ARGS
4444
"-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=${PT_CXX_ABI}")
4545

46+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
47+
4648
ExternalProject_Get_Property(googletest SOURCE_DIR)
4749

4850
set(TORCH_XLA_TEST_SOURCES

third_party/tensorflow

Submodule tensorflow updated 4236 files

0 commit comments

Comments
 (0)