Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
tensorflow
提交
b9a6fea1
T
tensorflow
项目概览
xxadev
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b9a6fea1
编写于
7月 08, 2019
作者:
A
Andy Ly
提交者:
TensorFlower Gardener
7月 08, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Grappler] Swap out LayoutOptimizer for GenericLayoutOptimizer.
PiperOrigin-RevId: 257021460
上级
355f7167
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
36 deletion
+38
-36
tensorflow/core/grappler/optimizers/BUILD
tensorflow/core/grappler/optimizers/BUILD
+1
-1
tensorflow/core/grappler/optimizers/meta_optimizer.cc
tensorflow/core/grappler/optimizers/meta_optimizer.cc
+4
-4
tensorflow/python/BUILD
tensorflow/python/BUILD
+33
-31
未找到文件。
tensorflow/core/grappler/optimizers/BUILD
浏览文件 @
b9a6fea1
...
...
@@ -594,9 +594,9 @@ cc_library(
":debug_stripper"
,
":dependency_optimizer"
,
":function_optimizer"
,
":generic_layout_optimizer"
,
":graph_optimizer"
,
":implementation_selector"
,
":layout_optimizer"
,
":loop_optimizer"
,
":memory_optimizer"
,
":model_pruner"
,
...
...
tensorflow/core/grappler/optimizers/meta_optimizer.cc
浏览文件 @
b9a6fea1
...
...
@@ -32,8 +32,8 @@ limitations under the License.
#include "tensorflow/core/grappler/optimizers/debug_stripper.h"
#include "tensorflow/core/grappler/optimizers/dependency_optimizer.h"
#include "tensorflow/core/grappler/optimizers/function_optimizer.h"
#include "tensorflow/core/grappler/optimizers/generic_layout_optimizer.h"
#include "tensorflow/core/grappler/optimizers/implementation_selector.h"
#include "tensorflow/core/grappler/optimizers/layout_optimizer.h"
#include "tensorflow/core/grappler/optimizers/loop_optimizer.h"
#include "tensorflow/core/grappler/optimizers/memory_optimizer.h"
#include "tensorflow/core/grappler/optimizers/model_pruner.h"
...
...
@@ -121,7 +121,7 @@ std::unique_ptr<GraphOptimizer> MetaOptimizer::MakeNewOptimizer(
MK_OPT
(
"constfold"
,
new
ConstantFolding
(
cpu_device_
));
MK_OPT
(
"shape"
,
new
ShapeOptimizer
());
MK_OPT
(
"remap"
,
new
Remapper
(
cfg_
.
remapping
()));
MK_OPT
(
"layout"
,
new
LayoutOptimizer
());
MK_OPT
(
"layout"
,
new
Generic
LayoutOptimizer
());
MK_OPT
(
"auto_mixed_precision"
,
new
AutoMixedPrecision
(
cfg_
.
auto_mixed_precision
()));
MK_OPT
(
"memory"
,
new
MemoryOptimizer
(
RewriterConfig
::
MANUAL
));
...
...
@@ -193,7 +193,7 @@ Status MetaOptimizer::InitializeOptimizers(
MakeUnique
<
DependencyOptimizer
>
(
cfg_
.
dependency_optimization
()));
}
if
(
cfg_
.
layout_optimizer
()
!=
RewriterConfig
::
OFF
)
{
optimizers
->
push_back
(
MakeUnique
<
LayoutOptimizer
>
());
optimizers
->
push_back
(
MakeUnique
<
Generic
LayoutOptimizer
>
());
}
if
(
AutoMixedPrecisionEnabled
(
cfg_
.
auto_mixed_precision
()))
{
optimizers
->
push_back
(
...
...
@@ -267,7 +267,7 @@ Status MetaOptimizer::InitializeCustomGraphOptimizers(
TF_RETURN_IF_ERROR
(
custom_optimizer
->
Init
(
&
optimizer_config
));
optimizers
->
push_back
(
std
::
move
(
custom_optimizer
));
}
else
{
// If there are no custom optimizers with given name, try to initalize a
// If there are no custom optimizers with given name, try to init
i
alize a
// default optimizer. This way, custom configurable optimizers can be
// mixed with default optimizers in any order.
auto
optimizer
=
MakeNewOptimizer
(
optimizer_config
.
name
());
...
...
tensorflow/python/BUILD
浏览文件 @
b9a6fea1
...
...
@@ -6438,37 +6438,39 @@ cuda_py_test(
xla_enable_strict_auto_jit
=
True
,
)
cuda_py_test
(
name
=
"layout_optimizer_test"
,
size
=
"medium"
,
srcs
=
[
"grappler/layout_optimizer_test.py"
,
],
additional_deps
=
[
":client_testlib"
,
":framework_for_generated_wrappers"
,
":array_ops"
,
":constant_op"
,
":dtypes"
,
":functional_ops"
,
":math_ops"
,
":nn"
,
":ops"
,
":random_ops"
,
":state_ops"
,
":tf_cluster"
,
":tf_optimizer"
,
":training"
,
"//third_party/py/numpy"
,
"//tensorflow/core:protos_all_py"
,
],
shard_count
=
10
,
tags
=
[
"grappler"
,
],
# This test will not run on XLA because it primarily tests the TF Classic flow.
xla_enable_strict_auto_jit
=
False
,
)
# TODO(b/131764887) Remove once LayoutOptimizer is swapped out with GenericLayoutOptimizer.
#
# cuda_py_test(
# name = "layout_optimizer_test",
# size = "medium",
# srcs = [
# "grappler/layout_optimizer_test.py",
# ],
# additional_deps = [
# ":client_testlib",
# ":framework_for_generated_wrappers",
# ":array_ops",
# ":constant_op",
# ":dtypes",
# ":functional_ops",
# ":math_ops",
# ":nn",
# ":ops",
# ":random_ops",
# ":state_ops",
# ":tf_cluster",
# ":tf_optimizer",
# ":training",
# "//third_party/py/numpy",
# "//tensorflow/core:protos_all_py",
# ],
# shard_count = 10,
# tags = [
# "grappler",
# ],
# # This test will not run on XLA because it primarily tests the TF Classic flow.
# xla_enable_strict_auto_jit = False,
# )
py_library
(
name
=
"cost_analyzer"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录