Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
a74e01ab
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a74e01ab
编写于
7月 02, 2021
作者:
H
houj04
提交者:
GitHub
7月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enhance npu/xpu log when kernel fallback to cpu, and fix cmake warnings. (#33927)
上级
15451c61
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
3 deletion
+9
-3
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+3
-3
paddle/fluid/imperative/prepared_operator.cc
paddle/fluid/imperative/prepared_operator.cc
+6
-0
未找到文件。
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
a74e01ab
...
@@ -110,7 +110,7 @@ cc_test(reader_test SRCS reader_test.cc DEPS reader)
...
@@ -110,7 +110,7 @@ cc_test(reader_test SRCS reader_test.cc DEPS reader)
cc_library
(
threadpool SRCS threadpool.cc DEPS enforce
)
cc_library
(
threadpool SRCS threadpool.cc DEPS enforce
)
cc_test
(
threadpool_test SRCS threadpool_test.cc DEPS threadpool
)
cc_test
(
threadpool_test SRCS threadpool_test.cc DEPS threadpool
)
cc_library
(
var_type_traits SRCS var_type_traits DEPS lod_tensor selected_rows framework_proto
)
cc_library
(
var_type_traits SRCS var_type_traits
.cc
DEPS lod_tensor selected_rows framework_proto
)
if
(
WITH_GPU
)
if
(
WITH_GPU
)
target_link_libraries
(
var_type_traits dynload_cuda
)
target_link_libraries
(
var_type_traits dynload_cuda
)
endif
()
endif
()
...
@@ -370,10 +370,10 @@ endif (NOT WIN32)
...
@@ -370,10 +370,10 @@ endif (NOT WIN32)
cc_library
(
dlpack_tensor SRCS dlpack_tensor.cc DEPS tensor dlpack
)
cc_library
(
dlpack_tensor SRCS dlpack_tensor.cc DEPS tensor dlpack
)
cc_test
(
dlpack_tensor_test SRCS dlpack_tensor_test.cc DEPS dlpack_tensor glog
)
cc_test
(
dlpack_tensor_test SRCS dlpack_tensor_test.cc DEPS dlpack_tensor glog
)
cc_library
(
op_compatible_info SRCS op_compatible_info DEPS string_helper proto_desc
)
cc_library
(
op_compatible_info SRCS op_compatible_info
.cc
DEPS string_helper proto_desc
)
cc_test
(
op_compatible_info_test SRCS op_compatible_info_test.cc DEPS op_compatible_info proto_desc string_helper glog
)
cc_test
(
op_compatible_info_test SRCS op_compatible_info_test.cc DEPS op_compatible_info proto_desc string_helper glog
)
cc_library
(
save_load_util SRCS save_load_util DEPS tensor scope layer
)
cc_library
(
save_load_util SRCS save_load_util
.cc
DEPS tensor scope layer
)
cc_test
(
save_load_util_test SRCS save_load_util_test.cc DEPS save_load_util tensor scope layer
)
cc_test
(
save_load_util_test SRCS save_load_util_test.cc DEPS save_load_util tensor scope layer
)
cc_library
(
generator SRCS generator.cc DEPS enforce place
)
cc_library
(
generator SRCS generator.cc DEPS enforce place
)
...
...
paddle/fluid/imperative/prepared_operator.cc
浏览文件 @
a74e01ab
...
@@ -128,6 +128,9 @@ PreparedOp PrepareImpl(const NameVarMap<VarType>& ins,
...
@@ -128,6 +128,9 @@ PreparedOp PrepareImpl(const NameVarMap<VarType>& ins,
#ifdef PADDLE_WITH_XPU
#ifdef PADDLE_WITH_XPU
if
(
kernel_iter
==
kernels
.
end
()
&&
if
(
kernel_iter
==
kernels
.
end
()
&&
is_xpu_place
(
expected_kernel_key
.
place_
))
{
is_xpu_place
(
expected_kernel_key
.
place_
))
{
VLOG
(
3
)
<<
"missing XPU kernel: "
<<
op
.
Type
()
<<
", expected_kernel_key:"
<<
expected_kernel_key
<<
", fallbacking to CPU one!"
;
expected_kernel_key
.
place_
=
platform
::
CPUPlace
();
expected_kernel_key
.
place_
=
platform
::
CPUPlace
();
kernel_iter
=
kernels
.
find
(
expected_kernel_key
);
kernel_iter
=
kernels
.
find
(
expected_kernel_key
);
}
}
...
@@ -135,6 +138,9 @@ PreparedOp PrepareImpl(const NameVarMap<VarType>& ins,
...
@@ -135,6 +138,9 @@ PreparedOp PrepareImpl(const NameVarMap<VarType>& ins,
#ifdef PADDLE_WITH_ASCEND_CL
#ifdef PADDLE_WITH_ASCEND_CL
if
(
kernel_iter
==
kernels
.
end
()
&&
if
(
kernel_iter
==
kernels
.
end
()
&&
is_npu_place
(
expected_kernel_key
.
place_
))
{
is_npu_place
(
expected_kernel_key
.
place_
))
{
VLOG
(
3
)
<<
"missing NPU kernel: "
<<
op
.
Type
()
<<
", expected_kernel_key:"
<<
expected_kernel_key
<<
", fallbacking to CPU one!"
;
expected_kernel_key
.
place_
=
platform
::
CPUPlace
();
expected_kernel_key
.
place_
=
platform
::
CPUPlace
();
kernel_iter
=
kernels
.
find
(
expected_kernel_key
);
kernel_iter
=
kernels
.
find
(
expected_kernel_key
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录