From da558f0e4e0bdcd2bc7e210c7eda8d617397b084 Mon Sep 17 00:00:00 2001 From: Qi Li Date: Thu, 17 Mar 2022 15:14:11 +0800 Subject: [PATCH] [ROCm] fix bfloat16 support, test=develop (#40401) --- paddle/fluid/imperative/gradient_accumulator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/imperative/gradient_accumulator.cc b/paddle/fluid/imperative/gradient_accumulator.cc index 12aa13bbacc..499cf4d8ad6 100644 --- a/paddle/fluid/imperative/gradient_accumulator.cc +++ b/paddle/fluid/imperative/gradient_accumulator.cc @@ -423,7 +423,7 @@ void TensorAdd(const VarType& src, VarType* dst) { } if (data_type == framework::proto::VarType::BF16) { if (platform::is_gpu_place(place)) { -#if defined(PADDLE_WITH_CUDA) +#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) return TensorAddImpl( src_tensor, dst_tensor, place); #else -- GitLab