From 356ff4366580d884864a6ccd01761904b1e65805 Mon Sep 17 00:00:00 2001 From: fwenguang <95677191+fwenguang@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:05:13 +0800 Subject: [PATCH] [MLU] rollback cntoolkit vetsion to 2.8.5 (#44595) --- paddle/fluid/platform/device/mlu/mlu_info.h | 2 +- .../unittests/mlu/test_grid_sampler_op_mlu.py | 39 ++++++++++--------- tools/dockerfile/Dockerfile.mlu | 24 ++++++------ 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/paddle/fluid/platform/device/mlu/mlu_info.h b/paddle/fluid/platform/device/mlu/mlu_info.h index 032606dd1c5..14f37879ef0 100644 --- a/paddle/fluid/platform/device/mlu/mlu_info.h +++ b/paddle/fluid/platform/device/mlu/mlu_info.h @@ -16,9 +16,9 @@ limitations under the License. */ #ifdef PADDLE_WITH_MLU #include +#include #include #include -#include #include #ifdef PADDLE_WITH_CNCL #include diff --git a/python/paddle/fluid/tests/unittests/mlu/test_grid_sampler_op_mlu.py b/python/paddle/fluid/tests/unittests/mlu/test_grid_sampler_op_mlu.py index 96dbaab9ee1..032c2e9a506 100644 --- a/python/paddle/fluid/tests/unittests/mlu/test_grid_sampler_op_mlu.py +++ b/python/paddle/fluid/tests/unittests/mlu/test_grid_sampler_op_mlu.py @@ -186,15 +186,16 @@ class TestGridSamplerOp(OpTest): self.mode = "bilinear" -class Case1(TestGridSamplerOp): - - def initTestCase(self): - self.x_shape = (2, 3, 5, 6) - self.grid_shape = (2, 8, 9, 2) - self.theta_shape = (2, 2, 3) - self.align_corners = True - self.padding_mode = "zeros" - self.mode = "bilinear" +# TODO(fwg): Test this case when cnnl support align_corners = True. +# class Case1(TestGridSamplerOp): +# +# def initTestCase(self): +# self.x_shape = (2, 3, 5, 6) +# self.grid_shape = (2, 8, 9, 2) +# self.theta_shape = (2, 2, 3) +# self.align_corners = True +# self.padding_mode = "zeros" +# self.mode = "bilinear" class LargeInputCase(TestGridSamplerOp): @@ -208,16 +209,16 @@ class LargeInputCase(TestGridSamplerOp): self.mode = "bilinear" -class Case2(LargeInputCase): - - def initTestCase(self): - self.x_shape = (2, 3, 128, 128) - self.grid_shape = (2, 130, 130, 2) - self.theta_shape = (2, 2, 3) - self.align_corners = True - self.padding_mode = "zeros" - self.mode = "bilinear" - +# TODO(fwg): Test this case when cnnl support align_corners = True. +# class Case2(LargeInputCase): +# +# def initTestCase(self): +# self.x_shape = (2, 3, 128, 128) +# self.grid_shape = (2, 130, 130, 2) +# self.theta_shape = (2, 2, 3) +# self.align_corners = True +# self.padding_mode = "zeros" +# self.mode = "bilinear" if __name__ == "__main__": unittest.main() diff --git a/tools/dockerfile/Dockerfile.mlu b/tools/dockerfile/Dockerfile.mlu index 3fa563ff65e..b3edb25fd54 100644 --- a/tools/dockerfile/Dockerfile.mlu +++ b/tools/dockerfile/Dockerfile.mlu @@ -2,14 +2,14 @@ # Update CNTOOLKIT_VERSION, CNNL_VERSION and CNCL_VERSION if using other versions # # Build: -# - CNTOOLKIT_VERSION 3.0.0-1 -# - CNNL_VERSION 1.11.0-1 -# - CNCL_VERSION 1.2.0-1 +# - CNTOOLKIT_VERSION 2.8.5 +# - CNNL_VERSION 1.10.5 +# - CNCL_VERSION 1.1.2 # # Download three packages from FTP (need to connect cambricon AE to get FTP url) -# - cntoolkit_3.0.0-1.ubuntu18.04_amd64.deb -# - cnnl_1.11.0-1.ubuntu18.04_amd64.deb -# - cncl_1.2.0-1.ubuntu18.04_amd64.deb +# - cntoolkit_2.8.5.ubuntu18.04_amd64.deb +# - cnnl_1.10.5.ubuntu18.04_amd64.deb +# - cncl_1.1.2.ubuntu18.04_amd64.deb # copy them to current directory first, then run build commands # # For example: @@ -21,9 +21,9 @@ # (get cncl pkg) # # docker build -f Dockerfile.mlu \ -# --build-arg CNTOOLKIT_VERSION=3.0.0-1 \ -# --build-arg CNNL_VERSION=1.11.0-1 \ -# --build-arg CNCL_VERSION=1.2.0-1 \ +# --build-arg CNTOOLKIT_VERSION=2.8.5 \ +# --build-arg CNNL_VERSION=1.10.5 \ +# --build-arg CNCL_VERSION=1.1.2 \ # -t paddlepaddle/paddle:latest-dev-mlu . # # without mlu device: @@ -40,9 +40,9 @@ MAINTAINER PaddlePaddle Authors ENV WITH_GPU=OFF -ARG CNTOOLKIT_VERSION=3.0.0-1 -ARG CNNL_VERSION=1.11.0-1 -ARG CNCL_VERSION=1.2.0-1 +ARG CNTOOLKIT_VERSION=2.8.5 +ARG CNNL_VERSION=1.10.5 +ARG CNCL_VERSION=1.1.2 ARG CNTOOLKIT_PKG=cntoolkit_$CNTOOLKIT_VERSION.ubuntu18.04_amd64.deb ARG CNNL_PKG=cnnl_$CNNL_VERSION.ubuntu18.04_amd64.deb ARG CNCL_PKG=cncl_$CNCL_VERSION.ubuntu18.04_amd64.deb -- GitLab