From 44054badff4c14a50b1172d31f9ad45e37462ea6 Mon Sep 17 00:00:00 2001 From: wuhuanzhou Date: Wed, 2 Jun 2021 18:53:46 +0800 Subject: [PATCH] fix compilation error on Ampere GPU, test=develop (#33285) --- paddle/fluid/operators/eigen/pad.cu | 2 ++ paddle/fluid/operators/eigen/slice.cu | 2 ++ 2 files changed, 4 insertions(+) diff --git a/paddle/fluid/operators/eigen/pad.cu b/paddle/fluid/operators/eigen/pad.cu index ee7d0429105..4cf88712d95 100644 --- a/paddle/fluid/operators/eigen/pad.cu +++ b/paddle/fluid/operators/eigen/pad.cu @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/eigen/eigen_function.h" +#include "paddle/fluid/platform/bfloat16.h" #include "paddle/fluid/platform/complex.h" #include "paddle/fluid/platform/float16.h" @@ -57,6 +58,7 @@ INSTANTIATION(EigenPad, int64_t); INSTANTIATION(EigenPad, float); INSTANTIATION(EigenPad, double); INSTANTIATION(EigenPad, platform::float16); +INSTANTIATION(EigenPad, platform::bfloat16); INSTANTIATION(EigenPad, platform::complex); INSTANTIATION(EigenPad, platform::complex); #undef INSTANTIATION diff --git a/paddle/fluid/operators/eigen/slice.cu b/paddle/fluid/operators/eigen/slice.cu index f059508394f..dc51fa72220 100644 --- a/paddle/fluid/operators/eigen/slice.cu +++ b/paddle/fluid/operators/eigen/slice.cu @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/eigen/eigen_function.h" +#include "paddle/fluid/platform/bfloat16.h" #include "paddle/fluid/platform/complex.h" #include "paddle/fluid/platform/float16.h" @@ -57,6 +58,7 @@ INSTANTIATION(EigenSlice, int64_t); INSTANTIATION(EigenSlice, float); INSTANTIATION(EigenSlice, double); INSTANTIATION(EigenSlice, platform::float16); +INSTANTIATION(EigenSlice, platform::bfloat16); INSTANTIATION(EigenSlice, platform::complex); INSTANTIATION(EigenSlice, platform::complex); #undef INSTANTIATION -- GitLab