提交 7f4052cf 编写于 作者: S Sanjoy Das 提交者: TensorFlower Gardener

Remove dependence on //tools/target_cpu:haswell from the tf_library macro

//tools/target_cpu:haswell isn't present in open source.

PiperOrigin-RevId: 257644093
上级 44bc5716
......@@ -22,6 +22,7 @@ load(
"tf_cc_test",
"tf_copts",
)
load("//tensorflow:tensorflow.bzl", "tfcompile_extra_flags")
def tf_library(
name,
......@@ -180,13 +181,7 @@ def tf_library(
# `find` on such an object.
need_xla_data_proto = flags and flags.find("--gen_program_shape") != -1
# Pass --target_cpu=haswell to tfcompile if compiling for Haswell (bazel
# build --cpu=haswell). We put it at the beginning of the flags list so
# that tfcompile_flags can override if if desired.
flags = select({
"//tools/target_cpu:haswell": "--target_cpu=haswell ",
"//conditions:default": "",
}) + flags
flags = tfcompile_extra_flags() + flags
if enable_xla_hlo_profiling:
profiling_flag = "--xla_hlo_profile"
......
......@@ -2492,3 +2492,6 @@ def if_mlir(if_true, if_false = []):
"//conditions:default": if_false,
"//tensorflow:with_mlir_support": if_true,
})
def tfcompile_extra_flags():
return ""
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册