MindSpore报错RuntimeError: Illegal fusion name: Transpose.
收藏回复举报
MindSpore报错RuntimeError: Illegal fusion name: Transpose.
发表于2023-01-30 11:26:45
0 查看

1 系统环境

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

MindSpore版本: mindspore=1.9.0

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

Python版本: Python=3.7.5

操作系统平台: linux

2 报错信息

2.1 问题描述

执行MindSpore1.9.0中的mindspore.ops.DepthToSpace算子出现报错

2.2 报错信息

RuntimeError: Illegal fusion name: Transpose.

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

import mindspore as ms
import mindspore.nn as nn
import mindspore.ops as ops

class TestNet(nn.Cell):
    """Structure of SubpixelConvolutionLayer"""
    def __init__(self, block_size):
        super(TestNet, self).__init__()
        self.pixel_shuffle = ops.DepthToSpace(block_size)

    def construct(self, x):
        out = self.pixel_shuffle(x)
        return out

ms.context.set_context(mode=ms.context.GRAPH_MODE, device_id=0)
net = TestNet(block_size=2)
x = ms.numpy.rand((1, 12, 1, 1))
net(x)

3 根因分析

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

代码中缺少Transpose Fusion Pattern,需要加上对应的Pattern。

4 解决方案

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

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

支持上传附件

我要发帖子