From 47cbf61dd4c135127ec767dc3a8fe353f935a024 Mon Sep 17 00:00:00 2001 From: zhupengyang Date: Tue, 10 Nov 2020 17:10:42 +0800 Subject: [PATCH] fix softmax unittest float16 random error (#28480) --- paddle/fluid/operators/softmax_op.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/paddle/fluid/operators/softmax_op.cc b/paddle/fluid/operators/softmax_op.cc index 63a27a8ccbf..ff25f191107 100644 --- a/paddle/fluid/operators/softmax_op.cc +++ b/paddle/fluid/operators/softmax_op.cc @@ -234,10 +234,6 @@ class SoftmaxOpGradMaker : public framework::SingleGradOpMaker { DECLARE_INPLACE_OP_INFERER(SoftmaxInplaceInferer, {"X", "Out"}); -// NOTE(zjl): AVX implementation of SoftmaxGrad does not support in-place -DECLARE_CUDA_ONLY_INPLACE_OP_INFERER(SoftmaxGradInplaceInferer, - {"Out", framework::GradVarName("X")}); - } // namespace operators } // namespace paddle @@ -248,8 +244,7 @@ REGISTER_OPERATOR(softmax, ops::SoftmaxOp, ops::SoftmaxOpMaker, ops::SoftmaxOpGradMaker, ops::SoftmaxOpGradMaker, ops::SoftmaxInplaceInferer); -REGISTER_OPERATOR(softmax_grad, ops::SoftmaxOpGrad, - ops::SoftmaxGradInplaceInferer); +REGISTER_OPERATOR(softmax_grad, ops::SoftmaxOpGrad); REGISTER_OP_CPU_KERNEL( softmax, ops::SoftmaxKernel, ops::SoftmaxKernel); -- GitLab