@@ -46,7 +46,8 @@ py_library(
46
46
srcs_version = "PY2AND3" ,
47
47
deps = [
48
48
":tpu_lib" ,
49
- ":tpu_py" ,
49
+ "//tensorflow/compiler/xla/experimental/xla_sharding" ,
50
+ "//tensorflow/compiler/xla/python_api:xla_shape" ,
50
51
"//tensorflow/contrib/training:training_py" ,
51
52
"//tensorflow/core:protos_all_py" ,
52
53
"//tensorflow/python:array_ops" ,
@@ -133,7 +134,7 @@ py_library(
133
134
134
135
tf_custom_op_py_library (
135
136
name = "tpu_py" ,
136
- srcs = glob (["python/ops/*.py" ]) + [ "__init__.py" ] ,
137
+ srcs = glob (["python/ops/*.py" ]),
137
138
dso = [":python/ops/_tpu_ops.so" ],
138
139
kernels = [
139
140
":all_ops" ,
@@ -152,9 +153,13 @@ tf_custom_op_py_library(
152
153
153
154
py_library (
154
155
name = "tpu" ,
155
- srcs = ["python/tpu/__init__.py" ],
156
+ srcs = [
157
+ "__init__.py" ,
158
+ "python/tpu/__init__.py" ,
159
+ ],
156
160
srcs_version = "PY2AND3" ,
157
161
deps = [
162
+ ":keras_support" , # split out to avoid cycle with tpu_strategy
158
163
":tpu_estimator" ,
159
164
":tpu_lib" ,
160
165
],
@@ -166,11 +171,13 @@ py_library(
166
171
"python/tpu/keras_support.py" ,
167
172
],
168
173
srcs_version = "PY2AND3" ,
174
+ visibility = [
175
+ "//tensorflow:__subpackages__" ,
176
+ ],
169
177
deps = [
170
178
":tpu_lib" ,
171
- ":tpu_py" ,
172
179
"//tensorflow/contrib/cluster_resolver:tpu_cluster_resolver_py" ,
173
- "//tensorflow/contrib/distribute/python:tpu_strategy " ,
180
+ "//tensorflow/contrib/distribute" ,
174
181
"//tensorflow/contrib/framework:framework_py" ,
175
182
"//tensorflow/contrib/tpu/proto:compilation_result_proto_py" ,
176
183
"//tensorflow/core:protos_all_py" ,
0 commit comments