未验证 提交 6962d3e2 编写于 作者: P pangengzheng 提交者: GitHub

exclude xpu (#54848)

上级 e25e86f4
......@@ -72,14 +72,18 @@ void AddKernel(const Context& dev_ctx,
const DenseTensor& x,
const DenseTensor& y,
DenseTensor* out) {
#ifdef PADDLE_WITH_CUDA
if (x.dtype() == phi::DataType::FLOAT32 &&
(y.dtype() == phi::DataType::BFLOAT16 ||
y.dtype() == phi::DataType::FLOAT16)) {
using Type = DataTypeToCppType<phi::DataType::FLOAT32>::type;
Float32Bfloat16OrFloat16AddCudaFunctor<Type, Context>(dev_ctx, x, y, out);
} else {
#endif
AddCudaFunctor<T, Context>(dev_ctx, x, y, -1, out);
#ifdef PADDLE_WITH_CUDA
}
#endif
}
template <typename T, typename Context>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册