if _TF_BAZELRC_FILENAME in l:
continue
f.write('%s\n' % l)
- f.write('import %s\n' % _TF_BAZELRC)
+ if is_windows():
+ tf_bazelrc_path = _TF_BAZELRC.replace("\\", "/")
+ else:
+ tf_bazelrc_path = _TF_BAZELRC
+ f.write('import %s\n' % tf_bazelrc_path)
def cleanup_makefile():
if which('bazel') is None:
print('Cannot find bazel. Please install bazel.')
sys.exit(0)
- curr_version = run_shell(['bazel', '--batch', 'version'])
+ curr_version = run_shell(['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
for line in curr_version.split('\n'):
if 'Build label: ' in line:
srcs = [
"dequantize_op.cc",
"meta_support.cc",
- "quantization_utils.cc",
"quantize_down_and_shrink_range.cc",
"quantize_op.cc",
"quantized_activation_ops.cc",
],
hdrs = [
"meta_support.h",
- "quantization_utils.h",
"reference_gemm.h",
],
deps = [
":image_resizer_state",
":ops_util",
":pooling_ops",
+ ":quantization_utils",
"//tensorflow/core:array_ops_op_lib",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
)
cc_library(
+ name = "quantization_utils",
+ srcs = ["quantization_utils.cc"],
+ hdrs = ["quantization_utils.h"],
+ deps = [
+ "//tensorflow/core:framework",
+ "@gemmlowp",
+ ],
+)
+
+cc_library(
name = "remote_fused_graph_execute_utils",
srcs = [
"i_remote_fused_graph_ops_definitions.cc",
srcs = [
"cwise_ops_common.cc",
"meta_support.cc",
- "quantization_utils.cc",
],
hdrs = [
"cwise_ops.h",
"cwise_ops_gpu_gradients.cu.h",
"cwise_ops_gradients.h",
"meta_support.h",
- "quantization_utils.h",
],
deps = [
":bounds_check",
+ ":quantization_utils",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//third_party/eigen3",
"//tensorflow/core:tensorflow",
"//tensorflow/contrib/rnn:gru_ops_op_lib",
"//tensorflow/contrib/rnn:lstm_ops_op_lib",
+ "//tensorflow/core/kernels:quantization_utils",
] + if_not_windows([
- "//tensorflow/core/kernels:quantized_ops",
"//tensorflow/core/kernels:remote_fused_graph_rewriter_transform",
"//tensorflow/core/kernels/hexagon:hexagon_rewriter_transform",
]),