Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
3c557e2f
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3c557e2f
编写于
2月 02, 2023
作者:
Y
YuanRisheng
提交者:
GitHub
2月 02, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BugFix]Fix bugs when compile with OneDNN (#50096)
* fix bugs * fix ci bugs
上级
e48c882f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
42 deletion
+15
-42
paddle/fluid/framework/feed_fetch_type.h
paddle/fluid/framework/feed_fetch_type.h
+5
-0
paddle/fluid/framework/string_array.h
paddle/fluid/framework/string_array.h
+9
-3
paddle/fluid/operators/controlflow/feed_op.cc
paddle/fluid/operators/controlflow/feed_op.cc
+0
-38
paddle/phi/kernels/funcs/CMakeLists.txt
paddle/phi/kernels/funcs/CMakeLists.txt
+1
-1
未找到文件。
paddle/fluid/framework/feed_fetch_type.h
浏览文件 @
3c557e2f
...
@@ -26,6 +26,11 @@ namespace framework {
...
@@ -26,6 +26,11 @@ namespace framework {
using
FeedType
=
using
FeedType
=
paddle
::
variant
<
phi
::
DenseTensor
,
Strings
,
phi
::
SparseCooTensor
>
;
paddle
::
variant
<
phi
::
DenseTensor
,
Strings
,
phi
::
SparseCooTensor
>
;
template
<
>
struct
PhiVectorType
<
FeedType
>
{
const
char
*
type_name
=
"PhiVectorFeedType"
;
};
using
FeedList
=
paddle
::
framework
::
PhiVector
<
FeedType
>
;
using
FeedList
=
paddle
::
framework
::
PhiVector
<
FeedType
>
;
using
FetchType
=
paddle
::
variant
<
phi
::
DenseTensor
,
using
FetchType
=
paddle
::
variant
<
phi
::
DenseTensor
,
...
...
paddle/fluid/framework/string_array.h
浏览文件 @
3c557e2f
...
@@ -102,6 +102,14 @@ class Vocab : public phi::ExtendedTensor,
...
@@ -102,6 +102,14 @@ class Vocab : public phi::ExtendedTensor,
// Kernel. It can be used when you define a non-tensor type that needs to be
// Kernel. It can be used when you define a non-tensor type that needs to be
// stored in a vector as PHI kernel argument.
// stored in a vector as PHI kernel argument.
template
<
typename
T
>
struct
PhiVectorType
;
template
<
>
struct
PhiVectorType
<
std
::
string
>
{
const
char
*
type_name
=
"PhiVectorString"
;
};
template
<
typename
T
>
template
<
typename
T
>
class
PhiVector
:
public
phi
::
ExtendedTensor
,
class
PhiVector
:
public
phi
::
ExtendedTensor
,
public
phi
::
TypeInfoTraits
<
phi
::
TensorBase
,
PhiVector
<
T
>>
{
public
phi
::
TypeInfoTraits
<
phi
::
TensorBase
,
PhiVector
<
T
>>
{
...
@@ -129,9 +137,7 @@ class PhiVector : public phi::ExtendedTensor,
...
@@ -129,9 +137,7 @@ class PhiVector : public phi::ExtendedTensor,
public:
public:
/// \brief Returns the name of the class for type traits.
/// \brief Returns the name of the class for type traits.
/// \return The name of the class.
/// \return The name of the class.
static
const
char
*
name
()
{
static
const
char
*
name
()
{
return
PhiVectorType
<
T
>
().
type_name
;
}
return
(
std
::
string
(
"PhiVector_"
)
+
std
::
string
(
typeid
(
T
).
name
())).
c_str
();
}
size_t
size
()
const
{
return
data_
.
size
();
}
size_t
size
()
const
{
return
data_
.
size
();
}
...
...
paddle/fluid/operators/controlflow/feed_op.cc
浏览文件 @
3c557e2f
...
@@ -267,44 +267,6 @@ PD_REGISTER_GENERAL_KERNEL(
...
@@ -267,44 +267,6 @@ PD_REGISTER_GENERAL_KERNEL(
ALL_LAYOUT
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedStringsKernel
<
phi
::
XPUContext
>
,
paddle
::
operators
::
FeedStringsKernel
<
phi
::
XPUContext
>
,
ALL_DTYPE
)
{}
ALL_DTYPE
)
{}
#elif defined(PADDLE_WITH_ASCEND_CL)
PD_REGISTER_GENERAL_KERNEL
(
feed_dense_tensor
,
npu
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedDenseTensorKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
PD_REGISTER_GENERAL_KERNEL
(
feed_sparse_coo_tensor
,
npu
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedSparseCooTensorKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
PD_REGISTER_GENERAL_KERNEL
(
feed_strings
,
npu
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedStringsKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
#elif defined(PADDLE_WITH_MLU)
PD_REGISTER_GENERAL_KERNEL
(
feed_dense_tensor
,
CustomMLU
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedDenseTensorKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
PD_REGISTER_GENERAL_KERNEL
(
feed_sparse_coo_tensor
,
CustomMLU
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedSparseCooTensorKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
PD_REGISTER_GENERAL_KERNEL
(
feed_strings
,
CustomMLU
,
ALL_LAYOUT
,
paddle
::
operators
::
FeedStringsKernel
<
phi
::
CustomContext
>
,
ALL_DTYPE
)
{}
#endif
#endif
#ifdef PADDLE_WITH_CUSTOM_DEVICE
#ifdef PADDLE_WITH_CUSTOM_DEVICE
namespace
paddle
{
namespace
paddle
{
...
...
paddle/phi/kernels/funcs/CMakeLists.txt
浏览文件 @
3c557e2f
...
@@ -27,7 +27,7 @@ math_library(sequence_scale)
...
@@ -27,7 +27,7 @@ math_library(sequence_scale)
cc_library
(
cc_library
(
phi_data_layout_transform
phi_data_layout_transform
SRCS data_layout_transform.cc
SRCS data_layout_transform.cc
DEPS tensor
)
DEPS tensor
blas
)
if
(
WITH_GPU OR WITH_ROCM
)
if
(
WITH_GPU OR WITH_ROCM
)
if
(
MKL_FOUND AND WITH_ONEMKL
)
if
(
MKL_FOUND AND WITH_ONEMKL
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录