diff --git a/paddle/fluid/platform/device/mlu/device_context.cc b/paddle/fluid/platform/device/mlu/device_context.cc index 40bdde2653e3c4b0e7296b9d477568baec110e7c..e737432ecb4db377750e40dc16661284bb25f19f 100644 --- a/paddle/fluid/platform/device/mlu/device_context.cc +++ b/paddle/fluid/platform/device/mlu/device_context.cc @@ -57,7 +57,7 @@ MLUDeviceContext::MLUDeviceContext(MLUPlace place) : place_(place) { MLUDeviceContext::~MLUDeviceContext() {} -Place MLUDeviceContext::GetPlace() const { return place_; } +const Place& MLUDeviceContext::GetPlace() const { return place_; } void MLUDeviceContext::Wait() const { context()->Stream()->Wait(); } diff --git a/paddle/fluid/platform/device/mlu/device_context.h b/paddle/fluid/platform/device/mlu/device_context.h index a3f3bda17c878d4a7b93ff3029fa9a76b5aefb63..120916b4f5c56c1f288392bebde1e88a9d863030 100644 --- a/paddle/fluid/platform/device/mlu/device_context.h +++ b/paddle/fluid/platform/device/mlu/device_context.h @@ -78,7 +78,7 @@ class MLUDeviceContext : public DeviceContext { explicit MLUDeviceContext(MLUPlace place); virtual ~MLUDeviceContext(); Eigen::DefaultDevice* eigen_device() const { return nullptr; } - Place GetPlace() const override; + const Place& GetPlace() const override; int GetComputeCapability() const; diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index d1fb2ba13bb65c968340e3ebc55e5a218ca962ad..f4ffa35c2bddd8da0812378e9825b54432c2430b 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -226,6 +226,7 @@ function cmake_base() { -DWITH_PSLIB=${WITH_PSLIB:-OFF} -DWITH_GLOO=${gloo_flag} -DWITH_LITE=${WITH_LITE:-OFF} + -DWITH_CNCL=${WITH_CNCL:-OFF} -DWITH_XPU=${WITH_XPU:-OFF} -DWITH_MLU=${WITH_MLU:-OFF} -DLITE_GIT_TAG=release/v2.10 @@ -277,6 +278,7 @@ EOF -DLITE_GIT_TAG=release/v2.10 \ -DWITH_XPU=${WITH_XPU:-OFF} \ -DWITH_MLU=${WITH_MLU:-OFF} \ + -DWITH_CNCL=${WITH_CNCL:-OFF} \ -DXPU_SDK_ROOT=${XPU_SDK_ROOT:-""} \ -DWITH_LITE=${WITH_LITE:-OFF} \ -DWITH_XPU_BKCL=${WITH_XPU_BKCL:-OFF} \