Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
56410b4a
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
56410b4a
编写于
1月 27, 2022
作者:
Q
Qi Li
提交者:
GitHub
1月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MLU] add compile ci scripts for MLU, test=mlu_ci (#39122)
上级
a8879215
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
35 addition
and
31 deletion
+35
-31
paddle/fluid/distributed/index_dataset/CMakeLists.txt
paddle/fluid/distributed/index_dataset/CMakeLists.txt
+2
-2
paddle/fluid/operators/concat_op_mlu.cc
paddle/fluid/operators/concat_op_mlu.cc
+2
-1
paddle/fluid/operators/fill_constant_op_mlu.cc
paddle/fluid/operators/fill_constant_op_mlu.cc
+2
-1
paddle/fluid/operators/mlu/CMakeLists.txt
paddle/fluid/operators/mlu/CMakeLists.txt
+1
-1
paddle/fluid/operators/split_op_mlu.cc
paddle/fluid/operators/split_op_mlu.cc
+0
-1
paddle/fluid/operators/sum_op_mlu.cc
paddle/fluid/operators/sum_op_mlu.cc
+1
-1
paddle/fluid/platform/CMakeLists.txt
paddle/fluid/platform/CMakeLists.txt
+6
-6
paddle/fluid/platform/device/CMakeLists.txt
paddle/fluid/platform/device/CMakeLists.txt
+5
-3
paddle/fluid/platform/device/mlu/CMakeLists.txt
paddle/fluid/platform/device/mlu/CMakeLists.txt
+8
-8
paddle/fluid/platform/stream/CMakeLists.txt
paddle/fluid/platform/stream/CMakeLists.txt
+1
-7
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+2
-0
tools/dockerfile/Dockerfile.paddle-mlu-build
tools/dockerfile/Dockerfile.paddle-mlu-build
+5
-0
未找到文件。
paddle/fluid/distributed/index_dataset/CMakeLists.txt
浏览文件 @
56410b4a
proto_library
(
index_dataset_proto SRCS index_dataset.proto
)
cc_library
(
index_wrapper SRCS index_wrapper.cc DEPS index_dataset_proto fs
)
if
(
WITH_MKLDNN
)
cc_library
(
index_sampler SRCS index_sampler.cc DEPS xxhash index_wrapper mkldnn
)
cc_library
(
index_sampler SRCS index_sampler.cc DEPS xxhash index_wrapper
eigen3
mkldnn
)
else
()
cc_library
(
index_sampler SRCS index_sampler.cc DEPS xxhash index_wrapper
)
cc_library
(
index_sampler SRCS index_sampler.cc DEPS xxhash index_wrapper
eigen3
)
endif
()
if
(
WITH_PYTHON
)
py_proto_compile
(
index_dataset_py_proto SRCS index_dataset.proto
)
...
...
paddle/fluid/operators/concat_op_mlu.cc
浏览文件 @
56410b4a
...
...
@@ -45,7 +45,8 @@ class ConcatMLUKernel : public framework::OpKernel<T> {
ins_dims
[
i
]
=
ins
[
i
]
->
dims
();
}
framework
::
DDim
out_dims
=
ComputeAndCheckShape
(
true
,
ins_dims
,
axis
);
framework
::
DDim
out_dims
=
pten
::
funcs
::
ComputeAndCheckShape
(
true
,
ins_dims
,
axis
);
out
->
Resize
(
out_dims
);
}
const
int
axis_t
=
axis
;
...
...
paddle/fluid/operators/fill_constant_op_mlu.cc
浏览文件 @
56410b4a
...
...
@@ -63,7 +63,8 @@ class FillConstantMLUKernel : public framework::OpKernel<T> {
framework
::
Tensor
mlu_tensor
;
auto
tmp_place
=
value_tensor
->
place
();
if
(
platform
::
is_mlu_place
(
tmp_place
))
{
TensorCopySync
(
*
value_tensor
,
platform
::
CPUPlace
(),
&
mlu_tensor
);
framework
::
TensorCopySync
(
*
value_tensor
,
platform
::
CPUPlace
(),
&
mlu_tensor
);
tensor_data
=
mlu_tensor
.
data
<
T
>
();
}
value
=
tensor_data
[
0
];
...
...
paddle/fluid/operators/mlu/CMakeLists.txt
浏览文件 @
56410b4a
IF
(
WITH_MLU
)
cc_library
(
mlu_baseop SRCS mlu_baseop.cc DEPS neuware_lib
framework_proto xxhash
)
cc_library
(
mlu_baseop SRCS mlu_baseop.cc DEPS neuware_lib
device_context
)
cc_test
(
activation_op_mlu_test SRCS activation_op_mlu_test.cc DEPS op_registry activation_op scope device_context executor
)
ENDIF
()
paddle/fluid/operators/split_op_mlu.cc
浏览文件 @
56410b4a
...
...
@@ -58,7 +58,6 @@ class SplitMLUKernel : public framework::OpKernel<T> {
std
::
vector
<
void
*>
vct_tensor
;
std
::
vector
<
MLUCnnlTensorDesc
>
output_descs
;
std
::
vector
<
cnnlTensorDescriptor_t
>
desc_vector
;
auto
place
=
ctx
.
GetPlace
();
for
(
size_t
i
=
0
;
i
<
outs
.
size
();
i
++
)
{
outs
[
i
]
->
mutable_data
<
T
>
(
ctx
.
GetPlace
());
output_descs
.
emplace_back
(
MLUCnnlTensorDesc
(
...
...
paddle/fluid/operators/sum_op_mlu.cc
浏览文件 @
56410b4a
...
...
@@ -33,7 +33,7 @@ class SumMLUKernel : public framework::OpKernel<T> {
auto
place
=
ctx
.
GetPlace
();
int
ins_size
=
static_cast
<
int
>
(
ins
.
size
());
if
(
ins_size
==
1
)
{
TensorCopy
(
*
ins
[
0
],
place
,
out
);
framework
::
TensorCopy
(
*
ins
[
0
],
place
,
out
);
return
;
}
...
...
paddle/fluid/platform/CMakeLists.txt
浏览文件 @
56410b4a
...
...
@@ -55,6 +55,12 @@ ENDIF()
cc_library
(
place SRCS place.cc DEPS enforce boost pten_place
)
cc_test
(
place_test SRCS place_test.cc DEPS place glog gflags
)
IF
(
WITH_MKLDNN
)
set
(
MKLDNN_CTX_DEPS mkldnn
)
ELSE
()
set
(
MKLDNN_CTX_DEPS
)
ENDIF
()
add_subdirectory
(
device
)
add_subdirectory
(
dynload
)
add_subdirectory
(
stream
)
...
...
@@ -85,12 +91,6 @@ IF(WITH_MLU)
set
(
MLU_CTX_DEPS mlu_device_context
)
ENDIF
()
IF
(
WITH_MKLDNN
)
set
(
MKLDNN_CTX_DEPS mkldnn
)
ELSE
()
set
(
MKLDNN_CTX_DEPS
)
ENDIF
()
IF
(
WITH_ASCEND_CL OR WITH_MLU
)
cc_library
(
stream_callback_manager SRCS stream_callback_manager.cc DEPS simple_threadpool enforce
)
ENDIF
()
...
...
paddle/fluid/platform/device/CMakeLists.txt
浏览文件 @
56410b4a
# GPU
IF
(
WITH_GPU OR WITH_ROCM
)
add_subdirectory
(
gpu
)
ENDIF
()
# XPU
IF
(
WITH_XPU
)
add_subdirectory
(
xpu
)
ENDIF
()
IF
(
WITH_GPU OR WITH_ROCM
)
add_subdirectory
(
gpu
)
ENDIF
()
# NPU
IF
(
WITH_ASCEND OR WITH_ASCEND_CL
)
...
...
paddle/fluid/platform/device/mlu/CMakeLists.txt
浏览文件 @
56410b4a
IF
(
WITH_MLU
)
cc_test
(
mlu_enforce_test SRCS enforce_test.cc DEPS stringpiece
)
cc_library
(
mlu_info SRCS mlu_info.cc DEPS enforce glog monitor neuware_lib
)
if
(
NOT WITH_MLU
)
return
()
endif
()
cc_library
(
mlu_stream SRCS mlu_stream.cc DEPS boost mlu_info stream_callback_manager
)
cc_library
(
mlu_device_context SRCS device_context.cc DEPS mlu_stream eigen3
)
cc_test
(
mlu_device_context_test SRCS device_context_test.cc DEPS mlu_device_context
)
ENDIF
(
)
cc_test
(
mlu_enforce_test SRCS enforce_test.cc DEPS stringpiece
)
cc_library
(
mlu_info SRCS mlu_info.cc DEPS enforce glog monitor neuware_lib
)
cc_library
(
mlu_stream SRCS mlu_stream.cc DEPS boost mlu_info stream_callback_manager eigen3
${
MKLDNN_CTX_DEPS
}
)
cc_library
(
mlu_device_context SRCS device_context.cc DEPS mlu_stream
)
cc_test
(
mlu_device_context_test SRCS device_context_test.cc DEPS mlu_device_context
)
paddle/fluid/platform/stream/CMakeLists.txt
浏览文件 @
56410b4a
IF
(
WITH_MKLDNN
)
set
(
MKLDNN_CTX_DEPS mkldnn
)
ELSE
()
set
(
MKLDNN_CTX_DEPS
)
ENDIF
()
IF
(
WITH_GPU OR WITH_ROCM
)
cc_library
(
cuda_stream SRCS cuda_stream.cc DEPS enforce boost
${
MKLDNN_CTX_DEPS
}
)
cc_library
(
cuda_stream SRCS cuda_stream.cc DEPS enforce boost eigen3
${
MKLDNN_CTX_DEPS
}
)
ENDIF
()
paddle/scripts/paddle_build.sh
浏览文件 @
56410b4a
...
...
@@ -227,6 +227,7 @@ function cmake_base() {
-DWITH_GLOO=
${
gloo_flag
}
-DWITH_LITE=
${
WITH_LITE
:-
OFF
}
-DWITH_XPU=
${
WITH_XPU
:-
OFF
}
-DWITH_MLU=
${
WITH_MLU
:-
OFF
}
-DLITE_GIT_TAG=release/v2.10
-DWITH_UNITY_BUILD=
${
WITH_UNITY_BUILD
:-
OFF
}
-DWITH_XPU_BKCL=
${
WITH_XPU_BKCL
:-
OFF
}
...
...
@@ -275,6 +276,7 @@ EOF
-DWITH_GLOO
=
${
gloo_flag
}
\
-DLITE_GIT_TAG
=
release/v2.10
\
-DWITH_XPU
=
${
WITH_XPU
:-
OFF
}
\
-DWITH_MLU
=
${
WITH_MLU
:-
OFF
}
\
-DXPU_SDK_ROOT
=
${
XPU_SDK_ROOT
:-
""
}
\
-DWITH_LITE
=
${
WITH_LITE
:-
OFF
}
\
-DWITH_XPU_BKCL
=
${
WITH_XPU_BKCL
:-
OFF
}
\
...
...
tools/dockerfile/Dockerfile.paddle-mlu-build
0 → 100644
浏览文件 @
56410b4a
FROM registry.baidubce.com/qili93/paddle-mlu:neuware-latest
RUN apt-get install pigz -y
RUN apt-get remove -y openjdk*
CMD ["/bin/bash"]
EXPOSE 22
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录