diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/arithmetic_cpu_kernel.h b/mindspore/ccsrc/backend/kernel_compiler/cpu/arithmetic_cpu_kernel.h index abf29af44a2..296d98ff084 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/arithmetic_cpu_kernel.h +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/arithmetic_cpu_kernel.h @@ -72,6 +72,7 @@ MS_REG_CPU_KERNEL_T(Pow, KernelAttr(), ArithmeticCPUKernel, float); MS_REG_CPU_KERNEL_T(Pow, KernelAttr(), ArithmeticCPUKernel, int64_t); MS_REG_CPU_KERNEL_T(RealDiv, KernelAttr(), ArithmeticCPUKernel, int32_t); MS_REG_CPU_KERNEL_T(RealDiv, KernelAttr(), ArithmeticCPUKernel, float); +MS_REG_CPU_KERNEL_T(RealDiv, KernelAttr(), ArithmeticCPUKernel, float16); MS_REG_CPU_KERNEL_T(RealDiv, KernelAttr(), ArithmeticCPUKernel, int64_t); MS_REG_CPU_KERNEL_T(Div, KernelAttr(), ArithmeticCPUKernel, int32_t); MS_REG_CPU_KERNEL_T(Div, KernelAttr(), ArithmeticCPUKernel, float); diff --git a/mindspore/ops/_op_impl/cpu/real_div.py b/mindspore/ops/_op_impl/cpu/real_div.py index b93fc136fa1..9a617a79698 100644 --- a/mindspore/ops/_op_impl/cpu/real_div.py +++ b/mindspore/ops/_op_impl/cpu/real_div.py @@ -21,6 +21,7 @@ real_div_op_info = CpuRegOp("RealDiv") \ .output(0, "output", "required") \ .dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.I32_Default) \ .dtype_format(DataType.F32_Default, DataType.F32_Default, DataType.F32_Default) \ + .dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.F16_Default) \ .dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.I64_Default) \ .get_op_info()