From 10fcaea36f5babd280a52bb203b387aaa22a293d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=BA=E8=B6=85?= Date: Fri, 22 Sep 2023 17:43:30 +0800 Subject: [PATCH 1/4] Ixrt environment --- .../resnet50/vendor_config/iluvatar_configurations.yaml | 4 ---- inference/docker_images/iluvatar/pytorch/Dockerfile | 6 +++--- inference/docker_images/iluvatar/pytorch/packages/README.md | 6 +++--- inference/docker_images/iluvatar/pytorch/pytorch_install.sh | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/inference/configs/resnet50/vendor_config/iluvatar_configurations.yaml b/inference/configs/resnet50/vendor_config/iluvatar_configurations.yaml index c721ede09..86ee38560 100644 --- a/inference/configs/resnet50/vendor_config/iluvatar_configurations.yaml +++ b/inference/configs/resnet50/vendor_config/iluvatar_configurations.yaml @@ -2,7 +2,3 @@ ixrt_tmp_path: iluvatar_tmp/resnet50-fp16.engine has_dynamic_axis: false repeat: 1 image_size: 224 -exist_onnx_path: onnxs/resnet50_bs256_pytorch_fp16False.onnx -# exist_compiler_path: resnet50-fp16.engine -output_types: {"output":"float32"} -input_types: {"input": "float32"} \ No newline at end of file diff --git a/inference/docker_images/iluvatar/pytorch/Dockerfile b/inference/docker_images/iluvatar/pytorch/Dockerfile index 3e72721cf..2b502c689 100644 --- a/inference/docker_images/iluvatar/pytorch/Dockerfile +++ b/inference/docker_images/iluvatar/pytorch/Dockerfile @@ -38,9 +38,9 @@ RUN apt-get install -y --fix-missing \ # Configure anaconda -RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && \ - bash ./Miniconda3-py38_4.10.3-Linux-x86_64.sh -b -p /root/miniconda && \ - /root/miniconda/bin/conda clean -tipsy && \ +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.5.2-0-Linux-x86_64.sh && \ + bash ./Miniconda3-py310_23.5.2-0-Linux-x86_64.sh -b -p /root/miniconda && \ + /root/miniconda/bin/conda clean -tip && \ ln -s /root/miniconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ echo ". /root/miniconda/etc/profile.d/conda.sh" >> ~/.bashrc && \ echo "conda activate base" >> ~/.bashrc && \ diff --git a/inference/docker_images/iluvatar/pytorch/packages/README.md b/inference/docker_images/iluvatar/pytorch/packages/README.md index 88a18b3dc..311a3fbfe 100644 --- a/inference/docker_images/iluvatar/pytorch/packages/README.md +++ b/inference/docker_images/iluvatar/pytorch/packages/README.md @@ -2,8 +2,8 @@ >联系邮箱: contact-us@iluvatar.com -ixrt-0.4.0+corex.3.2.0-cp38-cp38-linux_x86_64.whl +ixrt-0.7.0+corex.latest.version-cp310-cp310-linux_x86_64.whl -torch-1.13.1+corex.3.2.0-cp38-cp38-linux_x86_64.whl +torchvision-0.14.1+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl -torchvision-0.14.1+corex.3.2.0-cp38-cp38-linux_x86_64.whl \ No newline at end of file +pycuda-2022.2.2+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl \ No newline at end of file diff --git a/inference/docker_images/iluvatar/pytorch/pytorch_install.sh b/inference/docker_images/iluvatar/pytorch/pytorch_install.sh index 859591930..63cd26993 100644 --- a/inference/docker_images/iluvatar/pytorch/pytorch_install.sh +++ b/inference/docker_images/iluvatar/pytorch/pytorch_install.sh @@ -14,7 +14,7 @@ done search_sdk_results=`find ${SDK_DIR} -name "corex*.run"` for installer in $search_sdk_results; do echo "Install ${installer}" - sh "${installer}" -- --silent --driver --toolkit + sh "${installer}" -- --silent --toolkit done search_packages_results=`find ${PKG_DIR} -name "*.whl"` From d735389f3ad4e7308927523469856d7bcb269621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=BA=E8=B6=85?= Date: Fri, 22 Sep 2023 17:46:39 +0800 Subject: [PATCH 2/4] add touch config --- inference/docker_images/iluvatar/pytorch/packages/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inference/docker_images/iluvatar/pytorch/packages/README.md b/inference/docker_images/iluvatar/pytorch/packages/README.md index 311a3fbfe..d528a13fb 100644 --- a/inference/docker_images/iluvatar/pytorch/packages/README.md +++ b/inference/docker_images/iluvatar/pytorch/packages/README.md @@ -6,4 +6,6 @@ ixrt-0.7.0+corex.latest.version-cp310-cp310-linux_x86_64.whl torchvision-0.14.1+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl -pycuda-2022.2.2+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl \ No newline at end of file +pycuda-2022.2.2+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl + +torch-1.13.1+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl \ No newline at end of file From c38ec728f58280b2fbec5341971acd07c9d48b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=BA=E8=B6=85?= Date: Fri, 13 Oct 2023 15:01:49 +0800 Subject: [PATCH 3/4] Iluvatar yolov5 case --- inference/benchmarks/resnet50/README.md | 4 ++-- inference/benchmarks/yolov5/README.md | 20 +++++++++++++++++++ .../iluvatar/iluvatar_analysis.py | 6 ++++-- .../iluvatar/iluvatar_monitor.py | 2 +- .../iluvatar/pytorch/packages/README.md | 6 +++--- .../iluvatar/pytorch/sdk_installers/README.md | 2 +- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/inference/benchmarks/resnet50/README.md b/inference/benchmarks/resnet50/README.md index a1650ef8e..ff41be7c8 100644 --- a/inference/benchmarks/resnet50/README.md +++ b/inference/benchmarks/resnet50/README.md @@ -88,13 +88,13 @@ find ./val -name "*JPEG" | wc -l - OS kernel版本: 5.15.0-78-generic - 加速卡驱动版本:3.2.0 - Docker 版本:24.0.4 - - 训练框架版本:torch-1.13.1+corex.3.2.0 + - 训练框架版本:torch-1.13.1+corex.3.2.1 - 依赖软件版本: - cuda: 10.2 - 推理工具包 - - IXRT: ixrt-0.4.0+corex.3.2.0 + - IXRT: ixrt-0.7.0+corex.3.2.1 #### 2.5 腾讯紫霄 C100 diff --git a/inference/benchmarks/yolov5/README.md b/inference/benchmarks/yolov5/README.md index 7e0ffa4df..556aee05a 100644 --- a/inference/benchmarks/yolov5/README.md +++ b/inference/benchmarks/yolov5/README.md @@ -72,6 +72,25 @@ find ./val -name "*JPEG" | wc -l - XTCL 2.1 +#### 2.3 天数智芯 MR-V100 + +- ##### 硬件环境 + - 机器、加速卡型号: MR-V100 + +- ##### 软件环境 + - OS版本:Ubuntu 18.04 + - OS kernel版本: 5.15.0-78-generic + - 加速卡驱动版本:3.2.0 + - Docker 版本:24.0.4 + - 依赖软件版本: + - cuda: 10.2 + - torch-1.13.1+corex.3.2.0 + +- 推理工具包 + + - IXRT: ixrt-0.7.0+corex.3.2.0 + + ### 3. 运行情况 * 指标列表 @@ -95,3 +114,4 @@ find ./val -name "*JPEG" | wc -l | tensorrt | fp32 | 96 | 733.8 | / | / | 53.8 | 361.4 |12.6%| 0.45 | 35.44/40.0 | | tensorrt | fp16 | 96 | 1665.8 | / | / | 58.6 | 859 |15.0%| 0.45 | 26.15/40.0 | | kunlunxin_xtcl | fp32 | 96 | / | / | / | / | / |18.9%| 0.451 | 26.42/32.0 | +| ixrt | fp16(W16A32) | 96 | / | / | / | / | / |17.1%| 0.45 | 10.38/32.0 | diff --git a/inference/docker_images/iluvatar/iluvatar_analysis.py b/inference/docker_images/iluvatar/iluvatar_analysis.py index 77e9ac0a3..64346bd98 100644 --- a/inference/docker_images/iluvatar/iluvatar_analysis.py +++ b/inference/docker_images/iluvatar/iluvatar_analysis.py @@ -8,8 +8,10 @@ def analysis_log(logpath): usage = line.split(" ")[2] usage = float(usage[:-3]) max_usage = max(max_usage, usage) - max_mem = line.split(" ")[3] - max_mem = float(max_mem[:-3]) + if (max_usage >= usage): + m_mem = line.split(" ")[3] + m_mem = float(m_mem[:-3]) + max_mem = max(max_mem, m_mem) return round(max_usage / 1024.0, 2), round(max_mem / 1024.0, 2), eval("24e12"), eval("96e12") diff --git a/inference/docker_images/iluvatar/iluvatar_monitor.py b/inference/docker_images/iluvatar/iluvatar_monitor.py index ace3d8888..f815406ef 100644 --- a/inference/docker_images/iluvatar/iluvatar_monitor.py +++ b/inference/docker_images/iluvatar/iluvatar_monitor.py @@ -75,7 +75,7 @@ def run(self): def gpu_mon(file): TIMESTAMP = datetime.datetime.now().strftime('%Y-%m-%d-%H:%M:%S') - cmd = "ixsmi |grep 'Default'|awk '{print $3,$5,$9,$11,$13}'" + cmd = "export PATH=/usr/local/corex/bin:$PATH; export LD_LIBRARY_PATH=/usr/local/corex/lib:$LD_LIBRARY_PATH; ixsmi |grep 'Default'|awk '{print $3,$5,$9,$11,$13}'" process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, diff --git a/inference/docker_images/iluvatar/pytorch/packages/README.md b/inference/docker_images/iluvatar/pytorch/packages/README.md index d528a13fb..224dbe2af 100644 --- a/inference/docker_images/iluvatar/pytorch/packages/README.md +++ b/inference/docker_images/iluvatar/pytorch/packages/README.md @@ -4,8 +4,8 @@ ixrt-0.7.0+corex.latest.version-cp310-cp310-linux_x86_64.whl -torchvision-0.14.1+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl +torchvision-0.14.1+corex.3.2.1.20231006.892-cp310-cp310-linux_x86_64.whl -pycuda-2022.2.2+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl +pycuda-2022.2.2+corex.3.2.1.20231006.892-cp310-cp310-linux_x86_64.whl -torch-1.13.1+corex.3.2.0.20230914.859-cp310-cp310-linux_x86_64.whl \ No newline at end of file +torch-1.13.1+corex.3.2.1.20231006.892-cp310-cp310-linux_x86_64 \ No newline at end of file diff --git a/inference/docker_images/iluvatar/pytorch/sdk_installers/README.md b/inference/docker_images/iluvatar/pytorch/sdk_installers/README.md index 73564e7c8..c752ac5e0 100644 --- a/inference/docker_images/iluvatar/pytorch/sdk_installers/README.md +++ b/inference/docker_images/iluvatar/pytorch/sdk_installers/README.md @@ -2,6 +2,6 @@ >联系邮箱: contact-us@iluvatar.com -corex-installer-linux64-3.2.0-20230718_x86_64_10.2.run +corex-installer-linux64-3.2.1.20231006.892_x86_64_10.2.run partial_install_cuda_header.tar.gz \ No newline at end of file From 0ad493eb265aaef3690a758523a6675d67f70029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=BA=E8=B6=85?= Date: Fri, 13 Oct 2023 15:10:58 +0800 Subject: [PATCH 4/4] fix mistake --- inference/benchmarks/yolov5/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inference/benchmarks/yolov5/README.md b/inference/benchmarks/yolov5/README.md index 556aee05a..d26a2cbb6 100644 --- a/inference/benchmarks/yolov5/README.md +++ b/inference/benchmarks/yolov5/README.md @@ -84,11 +84,11 @@ find ./val -name "*JPEG" | wc -l - Docker 版本:24.0.4 - 依赖软件版本: - cuda: 10.2 - - torch-1.13.1+corex.3.2.0 + - torch-1.13.1+corex.3.2.1 - 推理工具包 - - IXRT: ixrt-0.7.0+corex.3.2.0 + - IXRT: ixrt-0.7.0+corex.3.2.1 ### 3. 运行情况