From daca85329740f8a92a8bc9b079827d6c7dbb4055 Mon Sep 17 00:00:00 2001 From: huangchengnuo Date: Mon, 6 Mar 2023 14:43:12 +0800 Subject: [PATCH] Add shape type registration --- .../device/cpu/kernel/shape_cpu_kernel.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/plugin/device/cpu/kernel/shape_cpu_kernel.cc b/mindspore/ccsrc/plugin/device/cpu/kernel/shape_cpu_kernel.cc index f9eb15167ba..a10fe7c152b 100644 --- a/mindspore/ccsrc/plugin/device/cpu/kernel/shape_cpu_kernel.cc +++ b/mindspore/ccsrc/plugin/device/cpu/kernel/shape_cpu_kernel.cc @@ -70,14 +70,29 @@ const std::vector> &Shap &ShapeCpuKernelMod::LaunchKernel}, {KernelAttr().AddInputAttr(kNumberTypeFloat64).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeInt8).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, {KernelAttr().AddInputAttr(kNumberTypeInt16).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), &ShapeCpuKernelMod::LaunchKernel}, {KernelAttr().AddInputAttr(kNumberTypeInt32).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), &ShapeCpuKernelMod::LaunchKernel}, {KernelAttr().AddInputAttr(kNumberTypeInt64).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeUInt8).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeUInt16).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeUInt32).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeUInt64).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, {KernelAttr().AddInputAttr(kNumberTypeBool).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), - &ShapeCpuKernelMod::LaunchKernel}}; + &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeComplex64).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, + {KernelAttr().AddInputAttr(kNumberTypeComplex128).AddOutputAttr(kObjectTypeTuple, kNumberTypeInt64), + &ShapeCpuKernelMod::LaunchKernel}, + }; return func_list; }