forked from mindspore-Ecosystem/mindspore
fix: ResizeBicubicGrad causes SparseConcat to choose the wrong DoCompute kernel
This commit is contained in:
parent
0f620a4bfd
commit
31e6ae5580
|
@ -401,7 +401,7 @@ inline void ResizeBicubicGrad(const float *input_grad, ResizerGradState &resizer
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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 input0_addr = reinterpret_cast<float *>(ctx.Input(0)->GetData());
|
||||||
auto output_addr = reinterpret_cast<T *>(ctx.Output(0)->GetData());
|
auto output_addr = reinterpret_cast<T *>(ctx.Output(0)->GetData());
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,6 @@
|
||||||
#include "cpu_ops_kernel.h"
|
#include "cpu_ops_kernel.h"
|
||||||
|
|
||||||
namespace aicpu {
|
namespace aicpu {
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
uint32_t DoCompute(CpuKernelContext &ctx);
|
|
||||||
|
|
||||||
class ResizeBicubicGradCpuKernel : public CpuKernel {
|
class ResizeBicubicGradCpuKernel : public CpuKernel {
|
||||||
public:
|
public:
|
||||||
~ResizeBicubicGradCpuKernel() = default;
|
~ResizeBicubicGradCpuKernel() = default;
|
||||||
|
@ -33,6 +29,8 @@ class ResizeBicubicGradCpuKernel : public CpuKernel {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t GetInputAndCheck(CpuKernelContext &ctx);
|
uint32_t GetInputAndCheck(CpuKernelContext &ctx);
|
||||||
|
template <typename T>
|
||||||
|
uint32_t DoCompute(CpuKernelContext &ctx);
|
||||||
};
|
};
|
||||||
} // namespace aicpu
|
} // namespace aicpu
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue