Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
d6b73958
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看板
提交
d6b73958
编写于
8月 16, 2018
作者:
qnqinan
提交者:
GitHub
8月 16, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #786 from chonwhite/develop
fix:
#785
上级
d383ae40
9793a310
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
25 addition
and
24 deletion
+25
-24
src/fpga/api.cpp
src/fpga/api.cpp
+1
-1
src/fpga/api.h
src/fpga/api.h
+0
-0
src/fpga/quantization.cpp
src/fpga/quantization.cpp
+2
-2
src/fpga/quantization.h
src/fpga/quantization.h
+1
-1
src/memory/t_malloc.cpp
src/memory/t_malloc.cpp
+1
-1
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
+3
-3
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
+2
-2
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
+2
-2
src/operators/kernel/fpga/conv_bn_kernel.cpp
src/operators/kernel/fpga/conv_bn_kernel.cpp
+3
-3
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
+2
-2
src/operators/kernel/fpga/fc_relu_kernel.cpp
src/operators/kernel/fpga/fc_relu_kernel.cpp
+4
-3
src/operators/kernel/fpga/fusion_fc_kernel.cpp
src/operators/kernel/fpga/fusion_fc_kernel.cpp
+2
-2
src/operators/kernel/fpga/softmax_kernel.cpp
src/operators/kernel/fpga/softmax_kernel.cpp
+1
-1
src/operators/op_param.h
src/operators/op_param.h
+1
-1
未找到文件。
src/fpga/api
/fpga_api
.cpp
→
src/fpga/api.cpp
浏览文件 @
d6b73958
...
...
@@ -27,7 +27,7 @@ limitations under the License. */
#include <cstdio>
#include <cstring>
#include "
fpga/api/fpga_
api.h"
#include "api.h"
namespace
paddle_mobile
{
namespace
fpga
{
...
...
src/fpga/api
/fpga_api
.h
→
src/fpga/api.h
浏览文件 @
d6b73958
文件已移动
src/fpga/
fpga_quantil
ization.cpp
→
src/fpga/
quant
ization.cpp
浏览文件 @
d6b73958
...
...
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
#include <algorithm>
namespace
paddle_mobile
{
...
...
@@ -47,7 +47,7 @@ static Dtype find_max(Dtype* data, int64_t num) {
}
// template <typename Dtype>
void
quanti
fy
_filter
(
framework
::
Tensor
*
filter
)
{
void
quanti
ze
_filter
(
framework
::
Tensor
*
filter
)
{
DLOG
<<
"quantilize_filter........"
;
float
scale
=
0
;
...
...
src/fpga/
fpga_quantil
ization.h
→
src/fpga/
quant
ization.h
浏览文件 @
d6b73958
...
...
@@ -24,7 +24,7 @@ template <typename Dtype>
static
void
chw_to_hwc
(
Dtype
*
data_in
,
Dtype
*
data_out
,
int64_t
num
,
int64_t
channel
,
int64_t
height
,
int64_t
width
);
void
quanti
fy
_filter
(
framework
::
Tensor
*
filter
);
void
quanti
ze
_filter
(
framework
::
Tensor
*
filter
);
}
// namespace fpga
}
// namespace paddle_mobile
src/memory/t_malloc.cpp
浏览文件 @
d6b73958
...
...
@@ -18,7 +18,7 @@ limitations under the License. */
#ifdef PADDLE_MOBILE_FPGA
#include "fpga/api
/fpga_api
.h"
#include "fpga/api.h"
#endif
...
...
src/operators/kernel/fpga/conv_add_bn_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -15,8 +15,8 @@ limitations under the License. */
#ifdef FUSION_CONVADDBN_OP
#include "operators/kernel/conv_add_bn_kernel.h"
#include "fpga/api
/fpga_api
.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/api.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -60,7 +60,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam *param) {
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quanti
fy
_filter
(
filter
);
fpga
::
quanti
ze
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -15,7 +15,7 @@ limitations under the License. */
#ifdef FUSION_CONVADDBNRELU_OP
#include "operators/kernel/conv_add_bn_relu_kernel.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -56,7 +56,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init(FusionConvAddBNReluParam *param) {
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quanti
fy
_filter
(
filter
);
fpga
::
quanti
ze
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_add_relu_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -15,7 +15,7 @@ limitations under the License. */
#ifdef FUSION_CONVADDRELU_OP
#include "operators/kernel/conv_add_relu_kernel.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -40,7 +40,7 @@ bool ConvAddReluKernel<FPGA, float>::Init(FusionConvAddReluParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
bias_ptr
[
i
];
}
fpga
::
quanti
fy
_filter
(
filter
);
fpga
::
quanti
ze
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_bn_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -15,8 +15,8 @@ limitations under the License. */
#ifdef FUSION_CONVBN_OP
#include "operators/kernel/conv_bn_kernel.h"
#include "fpga/api
/fpga_api
.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/api.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -55,7 +55,7 @@ bool ConvBNKernel<FPGA, float>::Init(FusionConvBNParam *param) {
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quanti
fy
_filter
(
filter
);
fpga
::
quanti
ze
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/conv_bn_relu_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -15,7 +15,7 @@ limitations under the License. */
#ifdef FUSION_CONVBNRELU_OP
#include "operators/kernel/conv_bn_relu_kernel.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -52,7 +52,7 @@ bool ConvBNReluKernel<FPGA, float>::Init(FusionConvBNReluParam *param) {
}
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
quanti
fy
_filter
(
filter
);
fpga
::
quanti
ze
_filter
(
filter
);
auto
filter_ptr
=
filter
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/fc_relu_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -13,8 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FUSION_FCRELU_OP
#include "operators/kernel/fc_relu_kernel.h"
#include "fpga/api/fpga_api.h"
#include "fpga/fpga_quantilization.h"
#include "fpga/api.h"
#include "fpga/quantization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -39,7 +40,7 @@ bool FusionFcReluKernel<FPGA, float>::Init(FusionFcReluParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
}
fpga
::
quanti
fy
_filter
(
input_y
);
fpga
::
quanti
ze
_filter
(
input_y
);
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/fusion_fc_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -14,7 +14,7 @@ limitations under the License. */
#ifdef FUSION_FC_OP
#include "operators/kernel/fusion_fc_kernel.h"
#include "fpga/
fpga_quantil
ization.h"
#include "fpga/
quant
ization.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -39,7 +39,7 @@ bool FusionFcKernel<FPGA, float>::Init(FusionFcParam *param) {
bs_ptr
[
i
*
2
+
1
]
=
input_z_ptr
[
i
];
}
fpga
::
quanti
fy
_filter
(
input_y
);
fpga
::
quanti
ze
_filter
(
input_y
);
auto
input_y_ptr
=
input_y
->
data
<
int8_t
>
();
fpga
::
ConvArgs
convArgs
;
...
...
src/operators/kernel/fpga/softmax_kernel.cpp
浏览文件 @
d6b73958
...
...
@@ -17,7 +17,7 @@ limitations under the License. */
#include "../softmax_kernel.h"
#include "../central-arm-func/softmax_arm_func.h"
#include "common/types.h"
#include "fpga/api
/fpga_api
.h"
#include "fpga/api.h"
#include "operators/math/softmax.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
src/operators/op_param.h
浏览文件 @
d6b73958
...
...
@@ -23,7 +23,7 @@ limitations under the License. */
#include "framework/tensor.h"
#include "framework/variable.h"
#ifdef PADDLE_MOBILE_FPGA
#include "fpga/api
/fpga_api
.h"
#include "fpga/api.h"
#endif
namespace
paddle_mobile
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录