From 0967506e8683fa8f1967eec55a69470fa4142d3c Mon Sep 17 00:00:00 2001 From: zhangbo9674 <82555433+zhangbo9674@users.noreply.github.com> Date: Wed, 2 Nov 2022 19:37:13 +0800 Subject: [PATCH] fix ci bug (#47583) * fix ci bug * test --- paddle/phi/kernels/gpu/activation_grad_kernel.cu | 1 + paddle/phi/kernels/xpu/add_n_kernel.cc | 1 + tools/get_pr_ut.py | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/gpu/activation_grad_kernel.cu b/paddle/phi/kernels/gpu/activation_grad_kernel.cu index c93baf86da..f5cf46bc10 100644 --- a/paddle/phi/kernels/gpu/activation_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/activation_grad_kernel.cu @@ -40,6 +40,7 @@ void ActivationGradGPUImpl(const Context& dev_ctx, d_out, errors::NotFound("The input DenseTensor dOut can not be nullptr")); PADDLE_ENFORCE_NOT_NULL( d_x, errors::NotFound("The output DenseTensor dX can not be nullptr")); + if (!out) { out = d_out; // fake out } diff --git a/paddle/phi/kernels/xpu/add_n_kernel.cc b/paddle/phi/kernels/xpu/add_n_kernel.cc index 3c5cae9d35..324ced03d9 100644 --- a/paddle/phi/kernels/xpu/add_n_kernel.cc +++ b/paddle/phi/kernels/xpu/add_n_kernel.cc @@ -51,6 +51,7 @@ void AddNKernel(const Context& dev_ctx, ptrs, reinterpret_cast(out->data()), out->numel()); + PADDLE_ENFORCE_XDNN_SUCCESS(r, "sum"); } diff --git a/tools/get_pr_ut.py b/tools/get_pr_ut.py index 59f1108188..3fee302aa4 100644 --- a/tools/get_pr_ut.py +++ b/tools/get_pr_ut.py @@ -341,7 +341,10 @@ class PRChecker(object): else: filterFiles.append(filename) elif ( - '/xpu/' or '/npu/' or '/mlu/' or '/ipu/' in filename.lower() + ('/xpu/' in filename.lower()) + or ('/npu/' in filename.lower()) + or ('/mlu/' in filename.lower()) + or ('/ipu/' in filename.lower()) ): filterFiles.append(filename) else: -- GitLab