Create noop BUILD macro for Cloud TPU tests.

PiperOrigin-RevId: 272742980
This commit is contained in:
Revan Sopher 2019-10-03 14:32:55 -07:00 committed by TensorFlower Gardener
parent d95b6cf530
commit c73f9f85fc
2 changed files with 31 additions and 0 deletions

View File

@ -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

View File

@ -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
)