diff --git a/tensorflow/opensource_only.files b/tensorflow/opensource_only.files index 9a29545297a..447610b559c 100644 --- a/tensorflow/opensource_only.files +++ b/tensorflow/opensource_only.files @@ -12,6 +12,7 @@ tensorflow/python/tpu/profiler/pip_package/BUILD tensorflow/python/tpu/profiler/pip_package/README tensorflow/python/tpu/profiler/pip_package/build_pip_package.sh tensorflow/python/tpu/profiler/pip_package/setup.py +tensorflow/python/tpu/tpu.bzl tensorflow/stream_executor/build_defs.bzl tensorflow/third_party/BUILD tensorflow/third_party/__init__.py diff --git a/tensorflow/python/tpu/tpu.bzl b/tensorflow/python/tpu/tpu.bzl new file mode 100644 index 00000000000..b9f22349e86 --- /dev/null +++ b/tensorflow/python/tpu/tpu.bzl @@ -0,0 +1,30 @@ +"""Provides python test rules for Cloud TPU.""" + +def tpu_py_test( + name, + tags = None, + disable_v2 = False, + disable_v3 = False, + disable_experimental = False, + args = [], + **kwargs): + """Generates identical unit test variants for various Cloud TPU versions. + + Args: + name: Name of test. Will be prefixed by accelerator versions. + tags: BUILD tags to apply to tests. + disable_v2: If true, don't generate TPU v2 tests. + disable_v3: If true, don't generate TPU v3 tests. + disable_experimental: Unused. + args: Arguments to apply to tests. + **kwargs: Additional named arguments to apply to tests. + """ + tags = tags or [] + + # TODO(rsopher): do something more useful here. + native.py_test( + name = name, + tags = tags, + args = args, + **kwargs + )