Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
fc442ec6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fc442ec6
编写于
5月 14, 2019
作者:
S
superjomn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reformat for cpplint
test=develop
上级
397d0567
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
35 addition
and
13 deletion
+35
-13
paddle/fluid/lite/api/cxx_api.h
paddle/fluid/lite/api/cxx_api.h
+4
-0
paddle/fluid/lite/core/mir/generate_program_pass.h
paddle/fluid/lite/core/mir/generate_program_pass.h
+3
-0
paddle/fluid/lite/core/mir/graph_visualize_pass.h
paddle/fluid/lite/core/mir/graph_visualize_pass.h
+2
-0
paddle/fluid/lite/core/mir/pass_manager.h
paddle/fluid/lite/core/mir/pass_manager.h
+1
-1
paddle/fluid/lite/core/mir/ssa_graph.h
paddle/fluid/lite/core/mir/ssa_graph.h
+2
-0
paddle/fluid/lite/core/mir/ssa_graph_test.cc
paddle/fluid/lite/core/mir/ssa_graph_test.cc
+1
-0
paddle/fluid/lite/core/mir/static_kernel_pick_pass.cc
paddle/fluid/lite/core/mir/static_kernel_pick_pass.cc
+1
-0
paddle/fluid/lite/core/mir/static_kernel_pick_pass.h
paddle/fluid/lite/core/mir/static_kernel_pick_pass.h
+1
-0
paddle/fluid/lite/core/mir/type_target_transform_pass.h
paddle/fluid/lite/core/mir/type_target_transform_pass.h
+1
-0
paddle/fluid/lite/core/op_lite.h
paddle/fluid/lite/core/op_lite.h
+6
-2
paddle/fluid/lite/core/op_registry.h
paddle/fluid/lite/core/op_registry.h
+1
-0
paddle/fluid/lite/core/target_wrapper.h
paddle/fluid/lite/core/target_wrapper.h
+1
-0
paddle/fluid/lite/core/type_system.h
paddle/fluid/lite/core/type_system.h
+4
-4
paddle/fluid/lite/operators/fc_op.h
paddle/fluid/lite/operators/fc_op.h
+1
-1
paddle/fluid/lite/operators/op_params.h
paddle/fluid/lite/operators/op_params.h
+1
-0
paddle/fluid/lite/utils/logging.h
paddle/fluid/lite/utils/logging.h
+5
-5
未找到文件。
paddle/fluid/lite/api/cxx_api.h
浏览文件 @
fc442ec6
...
@@ -13,6 +13,10 @@
...
@@ -13,6 +13,10 @@
// limitations under the License.
// limitations under the License.
#pragma once
#pragma once
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "paddle/fluid/lite/core/op_lite.h"
#include "paddle/fluid/lite/core/op_lite.h"
#include "paddle/fluid/lite/core/optimizer.h"
#include "paddle/fluid/lite/core/optimizer.h"
#include "paddle/fluid/lite/core/program.h"
#include "paddle/fluid/lite/core/program.h"
...
...
paddle/fluid/lite/core/mir/generate_program_pass.h
浏览文件 @
fc442ec6
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
#pragma once
#pragma once
#include <list>
#include <list>
#include <memory>
#include <utility>
#include <vector>
#include "paddle/fluid/lite/core/kernel.h"
#include "paddle/fluid/lite/core/kernel.h"
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/mir/pass.h"
...
...
paddle/fluid/lite/core/mir/graph_visualize_pass.h
浏览文件 @
fc442ec6
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#pragma once
#pragma once
#include <memory>
#include <string>
#include "paddle/fluid/inference/analysis/dot.h"
#include "paddle/fluid/inference/analysis/dot.h"
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/mir/pass.h"
...
...
paddle/fluid/lite/core/mir/pass_manager.h
浏览文件 @
fc442ec6
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
#pragma once
#pragma once
#include <list>
#include <list>
#include <map>
#include <map>
#include <memory>
#include <string>
#include <string>
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/mir/pass.h"
namespace
paddle
{
namespace
paddle
{
...
...
paddle/fluid/lite/core/mir/ssa_graph.h
浏览文件 @
fc442ec6
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#include <list>
#include <list>
#include <map>
#include <map>
#include <memory>
#include <set>
#include <stack>
#include <stack>
#include <string>
#include <string>
#include <vector>
#include <vector>
...
...
paddle/fluid/lite/core/mir/ssa_graph_test.cc
浏览文件 @
fc442ec6
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include "paddle/fluid/lite/core/mir/ssa_graph.h"
#include "paddle/fluid/lite/core/mir/ssa_graph.h"
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include <memory>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/lite/core/mir/graph_visualize_pass.h"
#include "paddle/fluid/lite/core/mir/graph_visualize_pass.h"
#include "paddle/fluid/lite/core/mir/passes.h"
#include "paddle/fluid/lite/core/mir/passes.h"
...
...
paddle/fluid/lite/core/mir/static_kernel_pick_pass.cc
浏览文件 @
fc442ec6
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include "paddle/fluid/lite/core/mir/static_kernel_pick_pass.h"
#include "paddle/fluid/lite/core/mir/static_kernel_pick_pass.h"
#include <algorithm>
#include <algorithm>
#include <memory>
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include "paddle/fluid/lite/core/mir/pass_registry.h"
#include "paddle/fluid/lite/core/mir/pass_registry.h"
...
...
paddle/fluid/lite/core/mir/static_kernel_pick_pass.h
浏览文件 @
fc442ec6
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#pragma once
#pragma once
#include <limits>
#include <limits>
#include <memory>
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/types.h"
#include "paddle/fluid/lite/core/types.h"
...
...
paddle/fluid/lite/core/mir/type_target_transform_pass.h
浏览文件 @
fc442ec6
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#pragma once
#pragma once
#include <memory>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include "paddle/fluid/lite/core/mir/pass.h"
#include "paddle/fluid/lite/core/mir/pass.h"
...
...
paddle/fluid/lite/core/op_lite.h
浏览文件 @
fc442ec6
...
@@ -14,9 +14,12 @@
...
@@ -14,9 +14,12 @@
#pragma once
#pragma once
#include <list>
#include <map>
#include <map>
#include <memory>
#include <memory>
#include <string>
#include <string>
#include <utility>
#include <vector>
#include "paddle/fluid/lite/core/context.h"
#include "paddle/fluid/lite/core/context.h"
#include "paddle/fluid/lite/core/kernel.h"
#include "paddle/fluid/lite/core/kernel.h"
#include "paddle/fluid/lite/core/scope.h"
#include "paddle/fluid/lite/core/scope.h"
...
@@ -49,8 +52,9 @@ class OpInfo;
...
@@ -49,8 +52,9 @@ class OpInfo;
class
OpLite
:
public
Registry
{
class
OpLite
:
public
Registry
{
public:
public:
OpLite
()
=
default
;
OpLite
()
=
default
;
OpLite
(
const
std
::
string
&
type
)
:
op_type_
(
type
)
{}
explicit
OpLite
(
const
std
::
string
&
type
)
:
op_type_
(
type
)
{}
OpLite
(
const
std
::
vector
<
Place
>
&
valid_places
)
:
valid_places_
(
valid_places
)
{
explicit
OpLite
(
const
std
::
vector
<
Place
>
&
valid_places
)
:
valid_places_
(
valid_places
)
{
LOG
(
INFO
)
<<
"valid places "
<<
valid_places
.
size
();
LOG
(
INFO
)
<<
"valid places "
<<
valid_places
.
size
();
}
}
...
...
paddle/fluid/lite/core/op_registry.h
浏览文件 @
fc442ec6
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
// limitations under the License.
// limitations under the License.
#pragma once
#pragma once
#include <list>
#include <memory>
#include <memory>
#include <set>
#include <set>
#include <string>
#include <string>
...
...
paddle/fluid/lite/core/target_wrapper.h
浏览文件 @
fc442ec6
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#pragma once
#pragma once
#include <iostream>
#include <iostream>
#include <sstream>
#include <sstream>
#include <string>
#include "paddle/fluid/lite/utils/cp_logging.h"
#include "paddle/fluid/lite/utils/cp_logging.h"
#ifdef LITE_WITH_CUDA
#ifdef LITE_WITH_CUDA
#include <cuda.h>
#include <cuda.h>
...
...
paddle/fluid/lite/core/type_system.h
浏览文件 @
fc442ec6
...
@@ -104,7 +104,7 @@ class DataType {
...
@@ -104,7 +104,7 @@ class DataType {
protected:
protected:
// Can only extended by subclass.
// Can only extended by subclass.
DataType
(
ID
id
)
:
id_
(
id
)
{}
explicit
DataType
(
ID
id
)
:
id_
(
id
)
{}
ID
id_
{
ID
::
Unsupported
};
ID
id_
{
ID
::
Unsupported
};
};
};
...
@@ -141,7 +141,7 @@ class Type : public DataType {
...
@@ -141,7 +141,7 @@ class Type : public DataType {
TargetType
target
()
const
{
return
place_
.
target
;
}
TargetType
target
()
const
{
return
place_
.
target
;
}
PrecisionType
precision
()
const
{
return
place_
.
precision
;
}
PrecisionType
precision
()
const
{
return
place_
.
precision
;
}
DataLayoutType
layout
()
const
{
return
place_
.
layout
;
}
DataLayoutType
layout
()
const
{
return
place_
.
layout
;
}
shor
t
device
()
const
{
return
place
().
device
;
}
int16_
t
device
()
const
{
return
place
().
device
;
}
const
Place
&
place
()
const
{
return
place_
;
}
const
Place
&
place
()
const
{
return
place_
;
}
const
std
::
string
&
name
()
const
{
return
name_
;
}
const
std
::
string
&
name
()
const
{
return
name_
;
}
...
@@ -156,7 +156,7 @@ class Type : public DataType {
...
@@ -156,7 +156,7 @@ class Type : public DataType {
/// One should avoid using this construct.
/// One should avoid using this construct.
Type
(
ID
id
,
const
std
::
string
&
name
,
TargetType
target
=
TargetType
::
kHost
,
Type
(
ID
id
,
const
std
::
string
&
name
,
TargetType
target
=
TargetType
::
kHost
,
PrecisionType
precision
=
PrecisionType
::
kFloat
,
PrecisionType
precision
=
PrecisionType
::
kFloat
,
DataLayoutType
layout
=
DataLayoutType
::
kNCHW
,
shor
t
device
=
0
)
DataLayoutType
layout
=
DataLayoutType
::
kNCHW
,
int16_
t
device
=
0
)
:
DataType
(
id
),
place_
{
target
,
precision
,
layout
,
device
},
name_
(
name
)
{}
:
DataType
(
id
),
place_
{
target
,
precision
,
layout
,
device
},
name_
(
name
)
{}
Place
place_
;
Place
place_
;
...
@@ -212,7 +212,7 @@ struct ParamType {
...
@@ -212,7 +212,7 @@ struct ParamType {
const
Type
*
type
;
const
Type
*
type
;
ParamType
()
=
default
;
ParamType
()
=
default
;
ParamType
(
const
Type
*
type
)
:
type
(
type
)
{}
explicit
ParamType
(
const
Type
*
type
)
:
type
(
type
)
{}
std
::
string
DebugString
()
const
{
return
type
->
name
();
}
std
::
string
DebugString
()
const
{
return
type
->
name
();
}
};
};
...
...
paddle/fluid/lite/operators/fc_op.h
浏览文件 @
fc442ec6
...
@@ -31,7 +31,7 @@ class FcOpLite : public OpLite {
...
@@ -31,7 +31,7 @@ class FcOpLite : public OpLite {
public:
public:
FcOpLite
()
{}
FcOpLite
()
{}
FcOpLite
(
const
std
::
string
&
type
)
:
OpLite
(
type
)
{}
explicit
FcOpLite
(
const
std
::
string
&
type
)
:
OpLite
(
type
)
{}
bool
CheckShape
()
const
override
;
bool
CheckShape
()
const
override
;
...
...
paddle/fluid/lite/operators/op_params.h
浏览文件 @
fc442ec6
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
// limitations under the License.
// limitations under the License.
#pragma once
#pragma once
#include <vector>
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/core/compatible_tensor.h"
#include "paddle/fluid/lite/utils/all.h"
#include "paddle/fluid/lite/utils/all.h"
...
...
paddle/fluid/lite/utils/logging.h
浏览文件 @
fc442ec6
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include <iostream>
#include <iostream>
#include <sstream>
#include <sstream>
// NOLINTFILE()
#ifdef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
#ifdef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
// LOG()
// LOG()
...
@@ -34,11 +36,9 @@
...
@@ -34,11 +36,9 @@
#define VLOG(level) LOG_INFO.stream()
#define VLOG(level) LOG_INFO.stream()
// CHECK()
// CHECK()
// NOLINT
// clang-format off
#define CHECK(x) \
#define CHECK(x) if (!(x)) paddle::lite::LogMessageFatal(__FILE__, __LINE__).stream() << "Check failed: " #x << ": " // NOLINT(*)
if (!(x)) \
// clang-format on
paddle::lite::LogMessageFatal(__FILE__, __LINE__).stream() \
<< "Check failed: " #x << ": "
#define CHECK_EQ(x, y) _CHECK_BINARY(x, ==, y)
#define CHECK_EQ(x, y) _CHECK_BINARY(x, ==, y)
#define CHECK_LT(x, y) _CHECK_BINARY(x, <, y)
#define CHECK_LT(x, y) _CHECK_BINARY(x, <, y)
#define CHECK_LE(x, y) _CHECK_BINARY(x, <=, y)
#define CHECK_LE(x, y) _CHECK_BINARY(x, <=, y)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录