MindSpoer中的mindspore.numpy.unique() not support 0 shape tensor
收藏回复举报
MindSpoer中的mindspore.numpy.unique() not support 0 shape tensor
发表于2023-03-20 19:12:24
0 查看

1 系统环境

硬件环境(Ascend/GPU/CPU): Ascend/GPU/CPU

MindSpore版本: 2.0.0

执行模式(PyNative/ Graph): PyNative模式

Python版本: 3.9.15

操作系统平台: Linux 18.04

2 报错信息

2.1 问题描述

mindspore.numpy.unique() 不支持 0 shape tensor

2.2 报错信息

RuntimeError: Malloc for kernel output failed, Memory isn't enough, node:Default/Unique-op0
----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ccsrc/runtime/pynative/run_op_helper.cc:473 LaunchKernels

2.3 脚本代码(代码格式,可上传附件)

a = ms.Tensor([])
ms.numpy.unique(a)

3 根因分析

******此处由用户补充详细的定位过程******

4 解决方案

******此处由用户填写******

包含文字方案和最终脚本代码

支持上传附件

我要发帖子