Ensure that tf_py_test tfrt test is not enabled for open source build by introducing tfrt_enabled_internal flag.
PiperOrigin-RevId: 312108475 Change-Id: Ia73668bf1e8f097441ed23dd75fb1ac2c0327e1f
This commit is contained in:
parent
83b85568fb
commit
dec7430b13
|
@ -1,4 +1,6 @@
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
|
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
|
||||||
|
|
||||||
|
# buildifier: disable=same-origin-load
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
|
||||||
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
||||||
|
|
||||||
# buildifier: disable=same-origin-load
|
# buildifier: disable=same-origin-load
|
||||||
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
|
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
|
||||||
load("//tensorflow/python/tpu:tpu.bzl", "tpu_py_test")
|
load("//tensorflow/python/tpu:tpu.bzl", "tpu_py_test")
|
||||||
load(
|
load(
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
# Contains the Keras preprocess layers (internal TensorFlow version).
|
# Contains the Keras preprocess layers (internal TensorFlow version).
|
||||||
|
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
|
|
||||||
|
# buildifier: disable=same-origin-load
|
||||||
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
||||||
load("//tensorflow/python/tpu:tpu.bzl", "tpu_py_test")
|
load("//tensorflow/python/tpu:tpu.bzl", "tpu_py_test")
|
||||||
load("//tensorflow/core/platform/default:distribute.bzl", "distribute_py_test")
|
load("//tensorflow/core/platform/default:distribute.bzl", "distribute_py_test")
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
# Tests of TensorFlow kernels written using the Python API.
|
# Tests of TensorFlow kernels written using the Python API.
|
||||||
|
|
||||||
load("//tensorflow:tensorflow.bzl", "sycl_py_test", "tf_custom_op_library", "tf_py_test")
|
load("//tensorflow:tensorflow.bzl", "sycl_py_test", "tf_custom_op_library")
|
||||||
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
||||||
|
|
||||||
|
# buildifier: disable=same-origin-load
|
||||||
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = ["//tensorflow:internal"],
|
default_visibility = ["//tensorflow:internal"],
|
||||||
licenses = ["notice"], # Apache 2.0
|
licenses = ["notice"], # Apache 2.0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Tests of tf.io.*proto.
|
# Tests of tf.io.*proto.
|
||||||
|
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_cc_shared_object")
|
load("//tensorflow:tensorflow.bzl", "tf_cc_shared_object")
|
||||||
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
|
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
|
||||||
load("//tensorflow/core/platform:build_config.bzl", "tf_additional_all_protos", "tf_proto_library")
|
load("//tensorflow/core/platform:build_config.bzl", "tf_additional_all_protos", "tf_proto_library")
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
# TensorFlow SavedModel.
|
# TensorFlow SavedModel.
|
||||||
|
|
||||||
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
||||||
|
|
||||||
|
# buildifier: disable=same-origin-load
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
|
|
|
@ -2218,6 +2218,15 @@ def tf_py_test(
|
||||||
xla_enabled = False,
|
xla_enabled = False,
|
||||||
grpc_enabled = False,
|
grpc_enabled = False,
|
||||||
tfrt_enabled = False,
|
tfrt_enabled = False,
|
||||||
|
# `tfrt_enabled` is set for some test targets, and if we enable
|
||||||
|
# TFRT tests just by that, this will enable TFRT builds for open source.
|
||||||
|
# TFRT open source is not fully integrated yet so we need a temporary
|
||||||
|
# workaround to enable TFRT only for internal builds. `tfrt_enabled_internal`
|
||||||
|
# will be set by `tensorflow.google.bzl`'s `tf_py_test` target, which is
|
||||||
|
# only applied for internal builds.
|
||||||
|
# TODO(b/156911178): Revert this temporary workaround once TFRT open source
|
||||||
|
# is fully integrated with TF.
|
||||||
|
tfrt_enabled_internal = False,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
"""Create one or more python tests with extra tensorflow dependencies."""
|
"""Create one or more python tests with extra tensorflow dependencies."""
|
||||||
xla_test_true_list = []
|
xla_test_true_list = []
|
||||||
|
@ -2261,7 +2270,7 @@ def tf_py_test(
|
||||||
deps = depset(deps + xla_test_true_list),
|
deps = depset(deps + xla_test_true_list),
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
if tfrt_enabled:
|
if tfrt_enabled_internal:
|
||||||
py_test(
|
py_test(
|
||||||
name = name + "_tfrt",
|
name = name + "_tfrt",
|
||||||
size = size,
|
size = size,
|
||||||
|
|
Loading…
Reference in New Issue