Commit 1958a89c authored by qianyj's avatar qianyj
Browse files

Update code to dtk23.10-tf2.11

parent 9fbb3cc0
...@@ -14,10 +14,12 @@ ResNet50使用了多个具有残差连接的残差块来解决梯度消失或梯 ...@@ -14,10 +14,12 @@ ResNet50使用了多个具有残差连接的残差块来解决梯度消失或梯
## 环境配置 ## 环境配置
### Docker(方法一) ### Docker(方法一)
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.11.0-centos7.6-dtk23.04.1-py38 docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.11.0-centos7.6-dtk23.10-py38
# <Your Image ID>用上面拉取docker镜像的ID替换 # <Your Image ID>用上面拉取docker镜像的ID替换
docker run --shm-size 16g --network=host --name=resnet50_tensorFlow --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/resnet50_tensorflow:/home/resnet50_tensorflow -it <Your Image ID> bash docker run --shm-size 16g --network=host --name=resnet50_tensorFlow --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/resnet50_tensorflow:/home/resnet50_tensorflow -it <Your Image ID> bash
pip install -r requirements.txt --no-deps pip install -r requirements.txt --no-deps
wget https://cancon.hpccube.com:65024/directlink/1/DTK-23.10/hyhal.tar.gz
tar -xzf hyhal.tar.gz -C /opt/
``` ```
### Dockerfile(方法二) ### Dockerfile(方法二)
``` ```
...@@ -30,12 +32,13 @@ docker run --rm --shm-size 16g --network=host --name=resnet50_tensorflow --privi ...@@ -30,12 +32,13 @@ docker run --rm --shm-size 16g --network=host --name=resnet50_tensorflow --privi
1、关于本项目DCU显卡所需的特殊深度学习库可以从开发者社区下载安装: 1、关于本项目DCU显卡所需的特殊深度学习库可以从开发者社区下载安装:
https://developer.hpccube.com/tool/ https://developer.hpccube.com/tool/
``` ```
DTK版本:dtk23.04.1 DTK版本:dtk23.10
python: 3.8 python: 3.8
tensorflow: 2.11 tensorflow: 2.11
tf-models-official: 2.11 tf-models-official: 2.11
keras: 2.11 keras: 2.11
tensorboard: 2.11 tensorboard: 2.11
hyhal
``` ```
`Tips:以上dtk、python、tensorflow等DCU相关工具版本需要严格一一对应` `Tips:以上dtk、python、tensorflow等DCU相关工具版本需要严格一一对应`
...@@ -163,10 +166,10 @@ sed指令只需要执行一次,添加支持多卡运行的代码 ...@@ -163,10 +166,10 @@ sed指令只需要执行一次,添加支持多卡运行的代码
| 卡数 | batch size | 类型 | Accuracy | 是否打开xla | 进程数 | | 卡数 | batch size | 类型 | Accuracy | 是否打开xla | 进程数 |
| :------: | :------: | :------: | :------: | :------:| -------- | | :------: | :------: | :------: | :------: | :------:| -------- |
| 4 | 512 | fp32 | 0.7628 | 否 | 单进程 | | 4 | 512 | fp32 | 0.763 | 否 | 单进程 |
| 4 | 512 | fp16 | 0.7616 | 否 | 单进程 | | 4 | 512 | fp16 | 0.764 | 否 | 单进程 |
| 4 | 512 | fp32 | 0.7608 | 否 | 四进程 | | 4 | 512 | fp32 | 0.764 | 否 | 四进程 |
| 4 | 512 | fp16 | 0.7615 | 否 | 四进程 | | 4 | 512 | fp16 | 0.763 | 否 | 四进程 |
## 应用场景 ## 应用场景
### 算法类别 ### 算法类别
......
FROM image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.11.0-centos7.6-dtk23.04.1-py38 FROM image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.11.0-centos7.6-dtk23.10-py38
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# RUN yum update && yum install -y git cmake wget build-essential # RUN yum update && yum install -y git cmake wget build-essential
RUN source /opt/dtk-23.04.1/env.sh RUN source /opt/dtk-23.10/env.sh
RUN wget https://cancon.hpccube.com:65024/directlink/1/DTK-23.10/hyhal.tar.gz
RUN tar -xzf hyhal.tar.gz -C /opt/
# 安装pip相关依赖 # 安装pip相关依赖
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
RUN pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt --no-deps RUN pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt --no-deps
absl-py==1.4
numpy==1.22.4 numpy==1.22.4
tensorflow_model_optimization tensorflow_model_optimization
tf-models-official==2.11 tf-models-official==2.11
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment