Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wux_labs
Tensorflow
提交
a463e69d
T
Tensorflow
项目概览
wux_labs
/
Tensorflow
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a463e69d
编写于
10月 14, 2022
作者:
J
Jake Harmon
提交者:
TensorFlower Gardener
10月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove tensorflow.bzl from TSL, except for profiler
PiperOrigin-RevId: 481193247
上级
1b59fa8f
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
131 addition
and
38 deletion
+131
-38
tensorflow/tsl/lib/gtl/BUILD
tensorflow/tsl/lib/gtl/BUILD
+5
-2
tensorflow/tsl/lib/hash/BUILD
tensorflow/tsl/lib/hash/BUILD
+6
-3
tensorflow/tsl/lib/histogram/BUILD
tensorflow/tsl/lib/histogram/BUILD
+3
-3
tensorflow/tsl/lib/io/BUILD
tensorflow/tsl/lib/io/BUILD
+10
-10
tensorflow/tsl/lib/io/snappy/BUILD
tensorflow/tsl/lib/io/snappy/BUILD
+5
-2
tensorflow/tsl/lib/math/BUILD
tensorflow/tsl/lib/math/BUILD
+5
-2
tensorflow/tsl/lib/random/BUILD
tensorflow/tsl/lib/random/BUILD
+9
-6
tensorflow/tsl/platform/BUILD
tensorflow/tsl/platform/BUILD
+1
-1
tensorflow/tsl/platform/default/BUILD
tensorflow/tsl/platform/default/BUILD
+1
-1
tensorflow/tsl/platform/default/build_config.bzl
tensorflow/tsl/platform/default/build_config.bzl
+7
-2
tensorflow/tsl/platform/default/build_config/BUILD
tensorflow/tsl/platform/default/build_config/BUILD
+1
-1
tensorflow/tsl/platform/profile_utils/BUILD
tensorflow/tsl/platform/profile_utils/BUILD
+2
-2
tensorflow/tsl/platform/windows/BUILD
tensorflow/tsl/platform/windows/BUILD
+1
-1
tensorflow/tsl/protobuf/BUILD
tensorflow/tsl/protobuf/BUILD
+1
-1
tensorflow/tsl/tsl.bzl
tensorflow/tsl/tsl.bzl
+73
-0
tensorflow/tsl/util/BUILD
tensorflow/tsl/util/BUILD
+1
-1
未找到文件。
tensorflow/tsl/lib/gtl/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow:tensorflow.default.bzl"
,
"filegroup"
)
load
(
"//tensorflow:tensorflow.bzl"
,
"tf_cc_tests"
)
load
(
"//tensorflow/tsl/platform:build_config.bzl"
,
"tsl_cc_test"
,
)
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
"cc_library"
,
...
...
@@ -196,7 +199,7 @@ filegroup(
],
)
t
f_cc_tests
(
t
sl_cc_test
(
name
=
"tsl_lib_gtl_tests"
,
srcs
=
[
"compactptrset_test.cc"
,
...
...
tensorflow/tsl/lib/hash/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow:tensorflow.default.bzl"
,
"filegroup"
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"//tensorflow
/tsl:tsl
.bzl"
,
"if_linux_x86_64"
,
"tf_cc_test"
,
"tf_copts"
,
)
load
(
"//tensorflow/tsl/platform:build_config.bzl"
,
"tsl_cc_test"
,
)
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
"cc_library"
,
...
...
@@ -56,7 +59,7 @@ filegroup(
visibility
=
[
"//tensorflow/core/lib/hash:__pkg__"
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"crc32c_test"
,
size
=
"small"
,
srcs
=
[
"crc32c_test.cc"
],
...
...
tensorflow/tsl/lib/histogram/BUILD
浏览文件 @
a463e69d
...
...
@@ -4,8 +4,8 @@ load(
"cc_library"
,
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"t
f
_cc_test"
,
"//tensorflow
/tsl/platform:build_config
.bzl"
,
"t
sl
_cc_test"
,
)
package
(
...
...
@@ -55,7 +55,7 @@ filegroup(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"histogram_test"
,
srcs
=
[
"histogram_test.cc"
,
...
...
tensorflow/tsl/lib/io/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow
:tensorflow.bzl"
,
"tf
_cc_test"
)
load
(
"//tensorflow
/tsl/platform:build_config.bzl"
,
"tsl
_cc_test"
)
load
(
"//tensorflow:tensorflow.default.bzl"
,
"filegroup"
)
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
...
...
@@ -402,7 +402,7 @@ filegroup(
visibility
=
[
"//tensorflow/core:__pkg__"
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"buffered_inputstream_test"
,
size
=
"small"
,
srcs
=
[
"buffered_inputstream_test.cc"
],
...
...
@@ -418,7 +418,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"cache_test"
,
size
=
"small"
,
srcs
=
[
"cache_test.cc"
],
...
...
@@ -431,7 +431,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"inputbuffer_test"
,
size
=
"small"
,
srcs
=
[
"inputbuffer_test.cc"
],
...
...
@@ -451,7 +451,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"inputstream_interface_test"
,
size
=
"small"
,
srcs
=
[
"inputstream_interface_test.cc"
],
...
...
@@ -464,7 +464,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"random_inputstream_test"
,
size
=
"small"
,
srcs
=
[
"random_inputstream_test.cc"
],
...
...
@@ -478,7 +478,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"record_reader_writer_test"
,
size
=
"small"
,
srcs
=
[
"record_reader_writer_test.cc"
],
...
...
@@ -498,7 +498,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"recordio_test"
,
size
=
"small"
,
srcs
=
[
"recordio_test.cc"
],
...
...
@@ -518,7 +518,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"table_test"
,
size
=
"small"
,
srcs
=
[
"table_test.cc"
],
...
...
@@ -537,7 +537,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"zlib_buffers_test"
,
size
=
"small"
,
srcs
=
[
"zlib_buffers_test.cc"
],
...
...
tensorflow/tsl/lib/io/snappy/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow:tensorflow.bzl"
,
"tf_cc_test"
)
load
(
"//tensorflow/tsl/platform:build_config.bzl"
,
"tsl_cc_test"
,
)
# Snappy targets.
...
...
@@ -76,7 +79,7 @@ cc_library(
alwayslink
=
True
,
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"snappy_test"
,
size
=
"small"
,
srcs
=
[
"snappy_test.cc"
],
...
...
tensorflow/tsl/lib/math/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow:tensorflow.default.bzl"
,
"get_compatible_with_portable"
)
load
(
"//tensorflow:tensorflow.bzl"
,
"tf_cc_test"
)
load
(
"//tensorflow/tsl/platform:build_config.bzl"
,
"tsl_cc_test"
,
)
package
(
default_visibility
=
[
...
...
@@ -23,7 +26,7 @@ cc_library(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"math_util_test"
,
size
=
"small"
,
srcs
=
[
...
...
tensorflow/tsl/lib/random/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow:tensorflow.bzl"
,
"tf_cc_test"
)
load
(
"//tensorflow/tsl/platform:build_config.bzl"
,
"tsl_cc_test"
,
)
load
(
"//tensorflow:tensorflow.default.bzl"
,
"filegroup"
,
"get_compatible_with_portable"
)
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
"cc_library"
)
...
...
@@ -169,7 +172,7 @@ filegroup(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"distribution_sampler_test"
,
size
=
"small"
,
srcs
=
[
"distribution_sampler_test.cc"
],
...
...
@@ -183,7 +186,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"philox_random_test"
,
size
=
"small"
,
srcs
=
[
"philox_random_test.cc"
],
...
...
@@ -198,7 +201,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"random_distributions_test"
,
srcs
=
[
"random_distributions_test.cc"
],
tags
=
[
"optonly"
],
...
...
@@ -214,7 +217,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"simple_philox_test"
,
size
=
"small"
,
srcs
=
[
"simple_philox_test.cc"
],
...
...
@@ -227,7 +230,7 @@ tf_cc_test(
],
)
t
f
_cc_test
(
t
sl
_cc_test
(
name
=
"weighted_picker_test"
,
size
=
"medium"
,
srcs
=
[
"weighted_picker_test.cc"
],
...
...
tensorflow/tsl/platform/BUILD
浏览文件 @
a463e69d
...
...
@@ -7,7 +7,7 @@
load
(
"@bazel_skylib//lib:selects.bzl"
,
"selects"
)
load
(
"//tensorflow:tensorflow.default.bzl"
,
"get_compatible_with_portable"
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"//tensorflow
/tsl:tsl
.bzl"
,
"tf_copts"
,
)
load
(
...
...
tensorflow/tsl/platform/default/BUILD
浏览文件 @
a463e69d
# Tensorflow default + linux implementations of tensorflow/core/platform libraries.
load
(
"@bazel_skylib//:bzl_library.bzl"
,
"bzl_library"
)
load
(
"//tensorflow:tensorflow.default.bzl"
,
"filegroup"
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"if_not_windows"
,
"tf_copts"
)
load
(
"//tensorflow
/tsl:tsl
.bzl"
,
"if_not_windows"
,
"tf_copts"
)
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
"cc_library"
)
package
(
...
...
tensorflow/tsl/platform/default/build_config.bzl
浏览文件 @
a463e69d
# Platform-specific build configurations.
load
(
"@com_google_protobuf//:protobuf.bzl"
,
"proto_gen"
)
load
(
"//tensorflow:tensorflow.bzl"
,
"clean_dep"
,
"if_libtpu"
,
"if_not_windows"
)
load
(
"//tensorflow/tsl/platform:build_config_root.bzl"
,
"if_static"
)
load
(
"//tensorflow/tsl:tsl.bzl"
,
"if_tsl_link_protobuf"
)
load
(
"//tensorflow/tsl:tsl.bzl"
,
"clean_dep"
,
"if_libtpu"
,
"if_not_windows"
,
"if_tsl_link_protobuf"
,
)
load
(
"@local_config_cuda//cuda:build_defs.bzl"
,
"if_cuda"
)
load
(
"@local_config_rocm//rocm:build_defs.bzl"
,
"if_rocm"
)
load
(
...
...
tensorflow/tsl/platform/default/build_config/BUILD
浏览文件 @
a463e69d
...
...
@@ -2,7 +2,7 @@
# Platform-specific build configurations.
load
(
"//tensorflow/tsl/platform:rules_cc.bzl"
,
"cc_library"
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"tf_copts"
)
load
(
"//tensorflow
/tsl:tsl
.bzl"
,
"tf_copts"
)
# TODO(jakeharmon): Determine if this will fail in TSL's github
package
(
default_visibility
=
[
"//tensorflow:internal"
])
...
...
tensorflow/tsl/platform/profile_utils/BUILD
浏览文件 @
a463e69d
...
...
@@ -7,8 +7,8 @@ load(
"cc_library"
,
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"tf_copts"
,
# @unused
"//tensorflow
/tsl:tsl
.bzl"
,
"tf_copts"
,
)
package
(
...
...
tensorflow/tsl/platform/windows/BUILD
浏览文件 @
a463e69d
...
...
@@ -2,7 +2,7 @@ load("//tensorflow:tensorflow.default.bzl", "filegroup")
# Tensorflow windows-specific implementations of tensorflow/core/platform libraries.
load
(
"//tensorflow
:tensorflow
.bzl"
,
"//tensorflow
/tsl:tsl
.bzl"
,
"tf_copts"
,
)
load
(
...
...
tensorflow/tsl/protobuf/BUILD
浏览文件 @
a463e69d
load
(
"//tensorflow
:tensorflow
.bzl"
,
"//tensorflow
/tsl:tsl
.bzl"
,
"if_google"
,
)
load
(
...
...
tensorflow/tsl/tsl.bzl
浏览文件 @
a463e69d
...
...
@@ -27,6 +27,7 @@ load(
"//third_party/compute_library:build_defs.bzl"
,
"if_enable_acl"
,
)
load
(
"@bazel_skylib//lib:new_sets.bzl"
,
"sets"
)
def
clean_dep
(
target
):
"""Returns string to 'target' in @org_tensorflow repository.
...
...
@@ -213,3 +214,75 @@ def tf_openmp_copts():
# copybara:comment_end
"//conditions:default"
:
[],
})
# Traverse the dependency graph along the "deps" attribute of the
# target and return a struct with one field called 'tf_collected_deps'.
# tf_collected_deps will be the union of the deps of the current target
# and the tf_collected_deps of the dependencies of this target.
def
_collect_deps_aspect_impl
(
target
,
ctx
):
# buildifier: disable=unused-variable
direct
,
transitive
=
[],
[]
all_deps
=
[]
if
hasattr
(
ctx
.
rule
.
attr
,
"deps"
):
all_deps
+=
ctx
.
rule
.
attr
.
deps
if
hasattr
(
ctx
.
rule
.
attr
,
"data"
):
all_deps
+=
ctx
.
rule
.
attr
.
data
if
hasattr
(
ctx
.
rule
.
attr
,
"roots"
):
all_deps
+=
ctx
.
rule
.
attr
.
roots
for
dep
in
all_deps
:
direct
.
append
(
dep
.
label
)
if
hasattr
(
dep
,
"tf_collected_deps"
):
transitive
.
append
(
dep
.
tf_collected_deps
)
return
struct
(
tf_collected_deps
=
depset
(
direct
=
direct
,
transitive
=
transitive
))
collect_deps_aspect
=
aspect
(
attr_aspects
=
[
"deps"
,
"data"
,
"roots"
],
implementation
=
_collect_deps_aspect_impl
,
)
def
_dep_label
(
dep
):
label
=
dep
.
label
return
label
.
package
+
":"
+
label
.
name
# This rule checks that transitive dependencies don't depend on the targets
# listed in the 'disallowed_deps' attribute, but do depend on the targets listed
# in the 'required_deps' attribute. Dependencies considered are targets in the
# 'deps' attribute or the 'data' attribute.
def
_check_deps_impl
(
ctx
):
required_deps
=
ctx
.
attr
.
required_deps
disallowed_deps
=
ctx
.
attr
.
disallowed_deps
for
input_dep
in
ctx
.
attr
.
deps
:
if
not
hasattr
(
input_dep
,
"tf_collected_deps"
):
continue
collected_deps
=
sets
.
make
(
input_dep
.
tf_collected_deps
.
to_list
())
for
disallowed_dep
in
disallowed_deps
:
if
sets
.
contains
(
collected_deps
,
disallowed_dep
.
label
):
fail
(
_dep_label
(
input_dep
)
+
" cannot depend on "
+
_dep_label
(
disallowed_dep
),
)
for
required_dep
in
required_deps
:
if
not
sets
.
contains
(
collected_deps
,
required_dep
.
label
):
fail
(
_dep_label
(
input_dep
)
+
" must depend on "
+
_dep_label
(
required_dep
),
)
return
struct
()
# buildifier: disable=rule-impl-return
check_deps
=
rule
(
_check_deps_impl
,
attrs
=
{
"deps"
:
attr
.
label_list
(
aspects
=
[
collect_deps_aspect
],
mandatory
=
True
,
allow_files
=
True
,
),
"disallowed_deps"
:
attr
.
label_list
(
default
=
[],
allow_files
=
True
,
),
"required_deps"
:
attr
.
label_list
(
default
=
[],
allow_files
=
True
,
),
},
)
tensorflow/tsl/util/BUILD
浏览文件 @
a463e69d
...
...
@@ -9,7 +9,7 @@ load(
"cc_library"
,
)
load
(
"//tensorflow
:tensorflow
.bzl"
,
"//tensorflow
/tsl:tsl
.bzl"
,
"check_deps"
,
"tf_copts"
,
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录