Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
231e5f1f
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看板
未验证
提交
231e5f1f
编写于
2月 18, 2020
作者:
H
huzhiqiang
提交者:
GitHub
2月 18, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUG FIX] fix look_uptable OP (#2911)
上级
eb2df898
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
lite/kernels/arm/lookup_table_compute.cc
lite/kernels/arm/lookup_table_compute.cc
+4
-4
lite/kernels/arm/lookup_table_compute.h
lite/kernels/arm/lookup_table_compute.h
+1
-1
lite/kernels/arm/lookup_table_compute_test.cc
lite/kernels/arm/lookup_table_compute_test.cc
+3
-3
未找到文件。
lite/kernels/arm/lookup_table_compute.cc
浏览文件 @
231e5f1f
...
@@ -67,22 +67,22 @@ void LookupTableCompute::Run() {
...
@@ -67,22 +67,22 @@ void LookupTableCompute::Run() {
REGISTER_LITE_KERNEL
(
lookup_table
,
REGISTER_LITE_KERNEL
(
lookup_table
,
kARM
,
kARM
,
k
Float
,
k
Any
,
kNCHW
,
kNCHW
,
paddle
::
lite
::
kernels
::
arm
::
LookupTableCompute
,
paddle
::
lite
::
kernels
::
arm
::
LookupTableCompute
,
def
)
def
)
.
BindInput
(
"W"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindInput
(
"W"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindInput
(
"Ids"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
),
PRECISION
(
k
Int64
))})
.
BindInput
(
"Ids"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
),
PRECISION
(
k
Any
))})
.
BindOutput
(
"Out"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindOutput
(
"Out"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
Finalize
();
.
Finalize
();
REGISTER_LITE_KERNEL
(
lookup_table_v2
,
REGISTER_LITE_KERNEL
(
lookup_table_v2
,
kARM
,
kARM
,
k
Float
,
k
Any
,
kNCHW
,
kNCHW
,
paddle
::
lite
::
kernels
::
arm
::
LookupTableCompute
,
paddle
::
lite
::
kernels
::
arm
::
LookupTableCompute
,
def
)
def
)
.
BindInput
(
"W"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindInput
(
"W"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindInput
(
"Ids"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
),
PRECISION
(
k
Int64
))})
.
BindInput
(
"Ids"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
),
PRECISION
(
k
Any
))})
.
BindOutput
(
"Out"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
BindOutput
(
"Out"
,
{
LiteType
::
GetTensorTy
(
TARGET
(
kARM
))})
.
Finalize
();
.
Finalize
();
lite/kernels/arm/lookup_table_compute.h
浏览文件 @
231e5f1f
...
@@ -21,7 +21,7 @@ namespace lite {
...
@@ -21,7 +21,7 @@ namespace lite {
namespace
kernels
{
namespace
kernels
{
namespace
arm
{
namespace
arm
{
class
LookupTableCompute
:
public
KernelLite
<
TARGET
(
kARM
),
PRECISION
(
k
Float
)
>
{
class
LookupTableCompute
:
public
KernelLite
<
TARGET
(
kARM
),
PRECISION
(
k
Any
)
>
{
public:
public:
using
param_t
=
operators
::
LookupTableParam
;
using
param_t
=
operators
::
LookupTableParam
;
...
...
lite/kernels/arm/lookup_table_compute_test.cc
浏览文件 @
231e5f1f
...
@@ -53,7 +53,7 @@ void lookup_table_compute_ref(const operators::LookupTableParam ¶m) {
...
@@ -53,7 +53,7 @@ void lookup_table_compute_ref(const operators::LookupTableParam ¶m) {
TEST
(
lookup_table_arm
,
retrieve_op
)
{
TEST
(
lookup_table_arm
,
retrieve_op
)
{
auto
lookup_table
=
auto
lookup_table
=
KernelRegistry
::
Global
().
Create
<
TARGET
(
kARM
),
PRECISION
(
k
Float
)
>
(
KernelRegistry
::
Global
().
Create
<
TARGET
(
kARM
),
PRECISION
(
k
Any
)
>
(
"lookup_table"
);
"lookup_table"
);
ASSERT_FALSE
(
lookup_table
.
empty
());
ASSERT_FALSE
(
lookup_table
.
empty
());
ASSERT_TRUE
(
lookup_table
.
front
());
ASSERT_TRUE
(
lookup_table
.
front
());
...
@@ -61,7 +61,7 @@ TEST(lookup_table_arm, retrieve_op) {
...
@@ -61,7 +61,7 @@ TEST(lookup_table_arm, retrieve_op) {
TEST
(
lookup_table_arm
,
init
)
{
TEST
(
lookup_table_arm
,
init
)
{
LookupTableCompute
lookup_table
;
LookupTableCompute
lookup_table
;
ASSERT_EQ
(
lookup_table
.
precision
(),
PRECISION
(
k
Float
));
ASSERT_EQ
(
lookup_table
.
precision
(),
PRECISION
(
k
Any
));
ASSERT_EQ
(
lookup_table
.
target
(),
TARGET
(
kARM
));
ASSERT_EQ
(
lookup_table
.
target
(),
TARGET
(
kARM
));
}
}
...
@@ -112,4 +112,4 @@ TEST(lookup_table_arm, compute) {
...
@@ -112,4 +112,4 @@ TEST(lookup_table_arm, compute) {
}
// namespace lite
}
// namespace lite
}
// namespace paddle
}
// namespace paddle
USE_LITE_KERNEL
(
lookup_table
,
kARM
,
k
Float
,
kNCHW
,
def
);
USE_LITE_KERNEL
(
lookup_table
,
kARM
,
k
Any
,
kNCHW
,
def
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录