fix: ResizeBicubicGrad causes SparseConcat to choose the wrong DoCompute kernel

This commit is contained in:
yanzhenxiang2020 2023-03-01 11:23:30 +08:00
parent 0f620a4bfd
commit 31e6ae5580
2 changed files with 3 additions and 5 deletions

View File

@ -401,7 +401,7 @@ inline void ResizeBicubicGrad(const float *input_grad, ResizerGradState &resizer
}
template <typename T>
uint32_t DoCompute(CpuKernelContext &ctx) {
uint32_t ResizeBicubicGradCpuKernel::DoCompute(CpuKernelContext &ctx) {
auto input0_addr = reinterpret_cast<float *>(ctx.Input(0)->GetData());
auto output_addr = reinterpret_cast<T *>(ctx.Output(0)->GetData());

View File

@ -22,10 +22,6 @@
#include "cpu_ops_kernel.h"
namespace aicpu {
template <typename T>
uint32_t DoCompute(CpuKernelContext &ctx);
class ResizeBicubicGradCpuKernel : public CpuKernel {
public:
~ResizeBicubicGradCpuKernel() = default;
@ -33,6 +29,8 @@ class ResizeBicubicGradCpuKernel : public CpuKernel {
private:
uint32_t GetInputAndCheck(CpuKernelContext &ctx);
template <typename T>
uint32_t DoCompute(CpuKernelContext &ctx);
};
} // namespace aicpu
#endif