Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
0bef76db
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0bef76db
编写于
7月 01, 2020
作者:
M
MaxwellDing
提交者:
GitHub
7月 01, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: merge MLU config API (
#118
)
上级
d81fbe8d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
14 deletion
+10
-14
lite/api/paddle_api.cc
lite/api/paddle_api.cc
+3
-6
lite/api/paddle_api.h
lite/api/paddle_api.h
+7
-8
未找到文件。
lite/api/paddle_api.cc
浏览文件 @
0bef76db
...
@@ -238,13 +238,10 @@ void CxxConfig::set_mlu_core_number(int core_number) {
...
@@ -238,13 +238,10 @@ void CxxConfig::set_mlu_core_number(int core_number) {
void
CxxConfig
::
set_mlu_input_layout
(
DataLayoutType
layout
)
{
void
CxxConfig
::
set_mlu_input_layout
(
DataLayoutType
layout
)
{
mlu_input_layout_
=
layout
;
mlu_input_layout_
=
layout
;
}
}
void
CxxConfig
::
set_mlu_use_first_conv
(
bool
use_first_conv
)
{
void
CxxConfig
::
set_mlu_firstconv_param
(
const
std
::
vector
<
float
>
&
mean
,
mlu_use_first_conv_
=
use_first_conv
;
const
std
::
vector
<
float
>
&
std
)
{
}
mlu_use_first_conv_
=
true
;
void
CxxConfig
::
set_mlu_first_conv_mean
(
const
std
::
vector
<
float
>
&
mean
)
{
mlu_first_conv_mean_
=
mean
;
mlu_first_conv_mean_
=
mean
;
}
void
CxxConfig
::
set_mlu_first_conv_std
(
const
std
::
vector
<
float
>
&
std
)
{
mlu_first_conv_std_
=
std
;
mlu_first_conv_std_
=
std
;
}
}
lite_api
::
MLUCoreVersion
CxxConfig
::
mlu_core_version
()
const
{
lite_api
::
MLUCoreVersion
CxxConfig
::
mlu_core_version
()
const
{
...
...
lite/api/paddle_api.h
浏览文件 @
0bef76db
...
@@ -184,17 +184,16 @@ class LITE_API CxxConfig : public ConfigBase {
...
@@ -184,17 +184,16 @@ class LITE_API CxxConfig : public ConfigBase {
void
set_mlu_core_version
(
lite_api
::
MLUCoreVersion
core_version
);
void
set_mlu_core_version
(
lite_api
::
MLUCoreVersion
core_version
);
// set MLU core number, which is used when compiling MLU kernels
// set MLU core number, which is used when compiling MLU kernels
void
set_mlu_core_number
(
int
core_number
);
void
set_mlu_core_number
(
int
core_number
);
// set MLU input layout. User can specify layout of input data to be NHWC,
// default is NCHW
void
set_mlu_input_layout
(
DataLayoutType
layout
);
// whether use MLU's first conv kernel. First conv is a special kernel
// whether use MLU's first conv kernel. First conv is a special kernel
// provided by MLU, its input is uint8, and also needs two 3-dimentional
// provided by MLU, its input is uint8, and also needs two 3-dimentional
// vectors which save all inputs' mean and std values
// vectors which save all inputs' mean and std values
void
set_mlu_use_first_conv
(
bool
use_first_conv
);
// set the 3-dimentional mean vector and 3-dimentional std vector used by
// set the 3-dimentional mean vector used by MLU's first conv
// MLU's first conv
void
set_mlu_first_conv_mean
(
const
std
::
vector
<
float
>&
mean
);
void
set_mlu_firstconv_param
(
const
std
::
vector
<
float
>&
mean
,
// set the 3-dimentional std vector used by MLU's first conv
const
std
::
vector
<
float
>&
std
);
void
set_mlu_first_conv_std
(
const
std
::
vector
<
float
>&
std
);
// set MLU input layout. User can specify layout of input data to be NHWC,
// default is NCHW
void
set_mlu_input_layout
(
DataLayoutType
layout
);
lite_api
::
MLUCoreVersion
mlu_core_version
()
const
;
lite_api
::
MLUCoreVersion
mlu_core_version
()
const
;
int
mlu_core_number
()
const
;
int
mlu_core_number
()
const
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录