From bc2bfa9265549a6c0c10596c429fe378bbb6ba5d Mon Sep 17 00:00:00 2001 From: zhangzhaoju Date: Fri, 18 Nov 2022 10:02:09 +0800 Subject: [PATCH] extend supported data type (int64 and float64) for primitive tensorshape --- .../kernel/arrays/dynamic_shape_gpu_kernel.cc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mindspore/ccsrc/plugin/device/gpu/kernel/arrays/dynamic_shape_gpu_kernel.cc b/mindspore/ccsrc/plugin/device/gpu/kernel/arrays/dynamic_shape_gpu_kernel.cc index 262abff6efb..a9c8d9bc33d 100755 --- a/mindspore/ccsrc/plugin/device/gpu/kernel/arrays/dynamic_shape_gpu_kernel.cc +++ b/mindspore/ccsrc/plugin/device/gpu/kernel/arrays/dynamic_shape_gpu_kernel.cc @@ -22,48 +22,72 @@ namespace kernel { MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, int32_t, int32_t) +MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeInt32), + TensorShapeGpuKernelMod, int64_t, int32_t) + MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat16).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, half, int32_t) MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat32).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, float, int32_t) +MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat64).AddOutputAttr(kNumberTypeInt32), + TensorShapeGpuKernelMod, double, int32_t) + MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeBool).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, bool, int32_t) MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, int32_t, int64_t) +MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeInt64), + TensorShapeGpuKernelMod, int64_t, int64_t) + MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat16).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, half, int64_t) MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat32).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, float, int64_t) +MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeFloat64).AddOutputAttr(kNumberTypeInt64), + TensorShapeGpuKernelMod, double, int64_t) + MS_REG_GPU_KERNEL_TWO(TensorShape, KernelAttr().AddInputAttr(kNumberTypeBool).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, bool, int64_t) MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, int32_t, int32_t) +MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeInt32), + TensorShapeGpuKernelMod, int64_t, int32_t) + MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat16).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, half, int32_t) MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat32).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, float, int32_t) +MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat64).AddOutputAttr(kNumberTypeInt32), + TensorShapeGpuKernelMod, double, int32_t) + MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeBool).AddOutputAttr(kNumberTypeInt32), TensorShapeGpuKernelMod, bool, int32_t) MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, int32_t, int64_t) +MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeInt64), + TensorShapeGpuKernelMod, int64_t, int64_t) + MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat16).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, half, int64_t) MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat32).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, float, int64_t) +MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeFloat64).AddOutputAttr(kNumberTypeInt64), + TensorShapeGpuKernelMod, double, int64_t) + MS_REG_GPU_KERNEL_TWO(DynamicShape, KernelAttr().AddInputAttr(kNumberTypeBool).AddOutputAttr(kNumberTypeInt64), TensorShapeGpuKernelMod, bool, int64_t) } // namespace kernel