Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
74580de7
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看板
提交
74580de7
编写于
3月 06, 2019
作者:
Z
zhangyang0701
提交者:
GitHub
3月 06, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1469 from qnqinan/develop
fix a bug in fetch kernel in fpga track fixed#1468
上级
84362dc0
f8252437
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
19 addition
and
24 deletion
+19
-24
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
...obile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
+12
-12
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/ViewController.swift
...le-unit-test/paddle-mobile-unit-test/ViewController.swift
+4
-4
src/operators/kernel/fpga/V1/fetch_kernel.cpp
src/operators/kernel/fpga/V1/fetch_kernel.cpp
+3
-8
未找到文件。
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
浏览文件 @
74580de7
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/ViewController.swift
浏览文件 @
74580de7
src/operators/kernel/fpga/V1/fetch_kernel.cpp
浏览文件 @
74580de7
...
@@ -11,9 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,9 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#include "operators/kernel/fetch_kernel.h"
#include "operators/kernel/fetch_kernel.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
@@ -35,7 +33,7 @@ bool FetchKernel<FPGA, float>::Init(FetchParam<FPGA> *param) {
...
@@ -35,7 +33,7 @@ bool FetchKernel<FPGA, float>::Init(FetchParam<FPGA> *param) {
args
.
input_layout_type
=
fpga
::
LAYOUT_CHW
;
args
.
input_layout_type
=
fpga
::
LAYOUT_CHW
;
args
.
output_layout_type
=
fpga
::
LAYOUT_HWC
;
args
.
output_layout_type
=
fpga
::
LAYOUT_HWC
;
args
.
image
.
address
=
input
->
data
<
half
>
();
args
.
image
.
address
=
input
->
data
<
half
>
();
args
.
image
.
channels
=
(
uint32_t
)
product
(
input
->
dims
()
);
args
.
image
.
channels
=
(
uint32_t
)
(
input
->
fpga_data_num
);
args
.
image
.
height
=
1
;
args
.
image
.
height
=
1
;
args
.
image
.
width
=
1
;
args
.
image
.
width
=
1
;
args
.
image
.
pad_height
=
0
;
args
.
image
.
pad_height
=
0
;
...
@@ -68,13 +66,10 @@ void FetchKernel<FPGA, float>::Compute(const FetchParam<FPGA> ¶m) {
...
@@ -68,13 +66,10 @@ void FetchKernel<FPGA, float>::Compute(const FetchParam<FPGA> ¶m) {
auto
outC
=
param
.
Out
()
->
dims
()[
1
];
auto
outC
=
param
.
Out
()
->
dims
()[
1
];
auto
outH
=
param
.
Out
()
->
dims
()[
2
];
auto
outH
=
param
.
Out
()
->
dims
()[
2
];
auto
outW
=
param
.
Out
()
->
dims
()[
3
];
auto
outW
=
param
.
Out
()
->
dims
()[
3
];
fpga
::
fpga_invalidate
(
param
.
fpga_bypass_args
.
output
.
address
,
outH
*
(
paddle_mobile
::
fpga
::
align_to_x
(
outC
*
outW
,
16
))
*
sizeof
(
float
));
float
*
outdata_ptr
=
float
*
outdata_ptr
=
reinterpret_cast
<
float
*>
(
param
.
fpga_bypass_args
.
output
.
address
);
reinterpret_cast
<
float
*>
(
param
.
fpga_bypass_args
.
output
.
address
);
fpga
::
fpga_invalidate
(
param
.
fpga_bypass_args
.
output
.
address
,
param
.
Out
()
->
fpga_data_num
*
sizeof
(
float
));
float
*
data_tmp
=
float
*
data_tmp
=
reinterpret_cast
<
float
*>
(
malloc
(
outC
*
outH
*
outW
*
sizeof
(
float
)));
reinterpret_cast
<
float
*>
(
malloc
(
outC
*
outH
*
outW
*
sizeof
(
float
)));
dealign
(
outdata_ptr
,
data_tmp
,
outC
,
outH
,
outW
);
dealign
(
outdata_ptr
,
data_tmp
,
outC
,
outH
,
outW
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录