From 2a8e8706a423a141bbdb7a8f99276c8aff172b4f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 2 Oct 2019 18:45:34 -0700 Subject: [PATCH] Build tensorflow 2.0 by default on master. PiperOrigin-RevId: 272567663 --- .bazelrc | 4 ++-- tensorflow/examples/adding_an_op/cuda_op.py | 2 +- tensorflow/python/eager/benchmarks/resnet50/BUILD | 2 ++ tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh | 2 +- tensorflow/tools/ci_build/windows/gpu/pip/build_tf_windows.sh | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index 1dd584c041b..d61dbe31f3d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -175,8 +175,8 @@ build:v1 --define=tf_api_version=1 build:v2 --define=tf_api_version=2 test:v1 --action_env=TF2_BEHAVIOR=0 test:v2 --action_env=TF2_BEHAVIOR=1 -build --config=v1 -test --config=v1 +build --config=v2 +test --config=v2 # Default options should come above this line diff --git a/tensorflow/examples/adding_an_op/cuda_op.py b/tensorflow/examples/adding_an_op/cuda_op.py index dd5428870bf..29971d373a8 100644 --- a/tensorflow/examples/adding_an_op/cuda_op.py +++ b/tensorflow/examples/adding_an_op/cuda_op.py @@ -23,5 +23,5 @@ import tensorflow as tf if tf.test.is_built_with_cuda(): _cuda_op_module = tf.load_op_library(os.path.join( - tf.resource_loader.get_data_files_path(), 'cuda_op_kernel.so')) + tf.compat.v1.resource_loader.get_data_files_path(), 'cuda_op_kernel.so')) add_one = _cuda_op_module.add_one diff --git a/tensorflow/python/eager/benchmarks/resnet50/BUILD b/tensorflow/python/eager/benchmarks/resnet50/BUILD index 760cdf00bf6..4f2407b50b6 100644 --- a/tensorflow/python/eager/benchmarks/resnet50/BUILD +++ b/tensorflow/python/eager/benchmarks/resnet50/BUILD @@ -49,6 +49,7 @@ cuda_py_test( "no_windows", # TODO(b/141617449): needs investigation "optonly", "oss_serial", + "v1only", ], ) @@ -67,6 +68,7 @@ cuda_py_test( "no_windows", # TODO(b/141617449): needs investigation "optonly", "oss_serial", + "v1only", ], # Times out xla_enable_strict_auto_jit = False, diff --git a/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh b/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh index 2488e783f89..1e825580071 100644 --- a/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh +++ b/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh @@ -168,7 +168,7 @@ N_JOBS="${NUMBER_OF_PROCESSORS}" bazel test --announce_rc --config=opt -k --test_output=errors \ ${EXTRA_TEST_FLAGS} \ --define=no_tensorflow_py_deps=true --test_lang_filters=py \ - --test_tag_filters=-no_pip,-no_windows,-no_oss,-gpu,-tpu \ + --test_tag_filters=-no_pip,-no_windows,-no_oss,-gpu,-tpu,-v1only \ --build_tag_filters=-no_pip,-no_windows,-no_oss,-gpu,-tpu --build_tests_only \ --test_size_filters=small,medium \ --jobs="${N_JOBS}" --test_timeout="300,450,1200,3600" \ diff --git a/tensorflow/tools/ci_build/windows/gpu/pip/build_tf_windows.sh b/tensorflow/tools/ci_build/windows/gpu/pip/build_tf_windows.sh index 4ea78e32dae..0238e7a39b4 100644 --- a/tensorflow/tools/ci_build/windows/gpu/pip/build_tf_windows.sh +++ b/tensorflow/tools/ci_build/windows/gpu/pip/build_tf_windows.sh @@ -170,7 +170,7 @@ bazel test --announce_rc --config=opt -k --test_output=errors \ ${EXTRA_TEST_FLAGS} \ --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute \ --define=no_tensorflow_py_deps=true --test_lang_filters=py \ - --test_tag_filters=-no_pip,-no_windows,-no_windows_gpu,-no_gpu,-no_pip_gpu,-no_oss,gpu \ + --test_tag_filters=-no_pip,-no_windows,-no_windows_gpu,-no_gpu,-no_pip_gpu,-no_oss,gpu,-v1only \ --build_tag_filters=-no_pip,-no_windows,-no_windows_gpu,-no_gpu,-no_pip_gpu,-no_oss,gpu --build_tests_only \ --test_size_filters=small,medium \ --local_test_jobs=$TF_GPU_COUNT --test_timeout="300,450,1200,3600" \