Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
d9b50f66
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看板
未验证
提交
d9b50f66
编写于
3月 16, 2021
作者:
Q
Qi Li
提交者:
GitHub
3月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ROCM] update ci scripts and dockefile, test=develop (#31551)
上级
1a6e3b04
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
28 addition
and
10 deletion
+28
-10
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+19
-3
tools/dockerfile/Dockerfile.rocm
tools/dockerfile/Dockerfile.rocm
+9
-7
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
d9b50f66
...
...
@@ -205,6 +205,13 @@ function cmake_base() {
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.8.0/include/python3.8
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.8.0/lib/libpython3.so"
pip3.8
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"conda-python3.7"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/conda/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/conda/bin/:
${
PATH
}
export
PYTHON_FLAGS
=
"-DPYTHON_EXECUTABLE:FILEPATH=/opt/conda/bin/python
-DPYTHON_INCLUDE_DIR:PATH=/opt/conda/include/python3.7m
-DPYTHON_LIBRARIES:FILEPATH=/opt/conda/lib/libpython3.so"
/opt/conda/bin/pip
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
fi
else
pip
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
...
...
@@ -230,7 +237,8 @@ function cmake_base() {
${
PYTHON_FLAGS
}
-DWITH_GPU=
${
WITH_GPU
:-
OFF
}
-DWITH_TENSORRT=
${
WITH_TENSORRT
:-
ON
}
-DWITH_AMD_GPU=
${
WITH_AMD_GPU
:-
OFF
}
-DWITH_ROCM=
${
WITH_ROCM
:-
OFF
}
-DWITH_RCCL=
${
WITH_RCCL
:-
OFF
}
-DWITH_DISTRIBUTE=
${
distibuted_flag
}
-DWITH_MKL=
${
WITH_MKL
:-
ON
}
-DWITH_AVX=
${
WITH_AVX
:-
OFF
}
...
...
@@ -267,7 +275,8 @@ EOF
${
PYTHON_FLAGS
}
\
-DWITH_GPU
=
${
WITH_GPU
:-
OFF
}
\
-DWITH_TENSORRT
=
${
WITH_TENSORRT
:-
ON
}
\
-DWITH_AMD_GPU
=
${
WITH_AMD_GPU
:-
OFF
}
\
-DWITH_ROCM
=
${
WITH_ROCM
:-
OFF
}
\
-DWITH_RCCL
=
${
WITH_RCCL
:-
OFF
}
\
-DWITH_DISTRIBUTE
=
${
distibuted_flag
}
\
-DWITH_MKL
=
${
WITH_MKL
:-
ON
}
\
-DWITH_AVX
=
${
WITH_AVX
:-
OFF
}
\
...
...
@@ -1028,6 +1037,8 @@ function card_test() {
# get the CUDA device count, XPU device count is one
if
[
"
${
WITH_XPU
}
"
==
"ON"
]
;
then
CUDA_DEVICE_COUNT
=
1
elif
[
"
${
WITH_ROCM
}
"
==
"ON"
]
;
then
CUDA_DEVICE_COUNT
=
4
else
CUDA_DEVICE_COUNT
=
$(
nvidia-smi
-L
|
wc
-l
)
fi
...
...
@@ -1423,7 +1434,7 @@ function parallel_test() {
mkdir
-p
${
PADDLE_ROOT
}
/build
cd
${
PADDLE_ROOT
}
/build
pip
install
${
PADDLE_ROOT
}
/build/python/dist/
*
whl
if
[
"
$WITH_GPU
"
==
"ON"
]
;
then
if
[
"
$WITH_GPU
"
==
"ON"
]
||
[
"
$WITH_ROCM
"
==
"ON"
]
;
then
parallel_test_base_gpu
else
if
[
"
$WITH_XPU
"
==
"ON"
]
;
then
...
...
@@ -1982,6 +1993,11 @@ function main() {
parallel_test
check_coverage
;;
check_rocm_coverage
)
cmake_gen_and_build
${
PYTHON_ABI
:-
""
}
${
parallel_number
}
parallel_test
check_coverage
;;
cmake_gen
)
cmake_gen
${
PYTHON_ABI
:-
""
}
;;
...
...
tools/dockerfile/Dockerfile.rocm
浏览文件 @
d9b50f66
...
...
@@ -5,7 +5,6 @@
# Build: ROCM 4.0.1
# cd Paddle/tools/dockerfile
# docker build -f Dockerfile.rocm \
# --build-arg ROCM_VERSION=4.0.1 \
# -t paddlepaddle/paddle-centos-rocm401-dev:latest .
#
# docker run -it --device=/dev/kfd --device=/dev/dri \
...
...
@@ -22,7 +21,7 @@ ENV LANGUAGE en_US.UTF-8
RUN yum install -y epel-release deltarpm sudo openssh-server gettext-devel sqlite-devel \
zlib-devel openssl-devel pcre-devel vim tk-devel tkinter libtool xz graphviz wget curl-devel \
make bzip2 git patch unzip bison yasm diffutils automake which file kernel-headers kernel-devel \
net-tools numactl-devel chrpath
net-tools numactl-devel chrpath
screen initscripts
# Install devtoolset-7
RUN yum install -y yum-utils centos-release-scl && \
...
...
@@ -45,11 +44,10 @@ RUN wget -q https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.tar.gz && \
ENV PATH=/opt/cmake-3.16/bin:${PATH}
# ROCM
ARG ROCM_VERSION
RUN yum install -y kmod wget openblas-devel epel-release
RUN echo "[ROCm]" > /etc/yum.repos.d/rocm.repo && \
echo "name=ROCm" >> /etc/yum.repos.d/rocm.repo && \
echo "baseurl=http://repo.radeon.com/rocm/yum/
${ROCM_VERSION}
" >> /etc/yum.repos.d/rocm.repo && \
echo "baseurl=http://repo.radeon.com/rocm/yum/
4.0.1
" >> /etc/yum.repos.d/rocm.repo && \
echo "enabled=1" >> /etc/yum.repos.d/rocm.repo && \
echo "gpgcheck=0" >> /etc/yum.repos.d/rocm.repo
RUN yum install -y rocm-dev rocm-utils rocfft miopen-hip rocblas hipsparse rocrand rccl hipcub rocthrust rocprofiler-dev roctracer-dev
...
...
@@ -89,10 +87,14 @@ RUN cd /opt && wget -q --no-check-certificate https://paddle-ci.cdn.bcebos.com/p
cd .. && rm -f protobuf-cpp-3.6.1.tar.gz && rm -rf protobuf-3.6.1
# conda
RUN cd /opt && wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x Miniconda3-latest-Linux-x86_64.sh
RUN mkdir /opt/conda && ./Miniconda3-latest-Linux-x86_64.sh -b -f -p "/opt/conda" && rm -rf Miniconda3-latest-Linux-x86_64.sh
ENV CONDA_FILE=Miniconda3-py37_4.9.2-Linux-x86_64.sh
RUN cd /opt && wget https://repo.anaconda.com/miniconda/${CONDA_FILE} && chmod +x ${CONDA_FILE}
RUN mkdir /opt/conda && ./${CONDA_FILE} -b -f -p "/opt/conda" && rm -rf ${CONDA_FILE}
ENV PATH=/opt/conda/bin:${PATH}
RUN conda init bash && conda install -n base jupyter
RUN conda init bash && conda install -n base jupyter jupyterlab
# install pylint and pre-commit
RUN /opt/conda/bin/pip install pre-commit pylint pytest astroid isort protocol PyGithub
# install Paddle requirement
RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/requirements.txt -O /root/requirements.txt
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录