2.4K Star 8.1K Fork 4.4K

GVPMindSpore / mindspore

 / 详情

[CT][MS][PARALLEL] network with switch_layer could not run auto_parallel

TODO
Bug-Report
创建于  
2020-08-25 17:17
name about labels
Bug Report Use this template for reporting a bug kind/bug

Environment

  • Hardware Environment(Ascend/GPU/CPU): GPU

/device gpu

  • Software Environment:
    -- MindSpore version (source or binary): vm+Graph
    -- Python version (e.g., Python 3.7.5):
    -- OS platform and distribution (e.g., Linux Ubuntu 16.04):
    -- GCC/Compiler version (if compiled from source):

Related testcase

class DataParallelNet(Cell, MetaFactory):


    def __init__(self, in_channel, out_channel, strategy1=None, strategy2=None):
        super().__init__()
        MetaFactory.__init__(self)
        self.relu = nn.ReLU()
        self.relu6 = nn.ReLU6()
        self.conv = nn.Conv2d(in_channels=in_channel, out_channels=out_channel, kernel_size=2, stride=1, has_bias=False,
                           weight_init='ones', pad_mode='same')
        self.mean = P.ReduceMean(keep_dims=False)
        self.fc1 = nn.Dense(in_channels=out_channel, out_channels=out_channel, weight_init='ones', bias_init='zeros',
                        has_bias=True)
        self.fc2 = nn.Dense(in_channels=out_channel, out_channels=out_channel, weight_init='ones', bias_init='zeros',
                         has_bias=False)
        if strategy1 is not None:
            self.fc1.matmul.set_strategy(strategy1)
        if strategy2 is not None:
            self.fc2.matmul.set_strategy(strategy2)
        self.i = Parameter(Tensor(0, mstype.int32), name="index", requires_grad=False)
        self.funcs = (self.fc1, self.fc2)
        self.cast = P.Cast()
        weight_np = np.ones([128, 16]).astype(np.float32) * 0.00001
        self.embedding = nn.Embedding(128, 16, False, Tensor(weight_np))


    def construct(self, x):
        x = self.relu(x)  # (128, 3, 2, 1024)
        # x = self.relu6(x)  # (128, 3, 2, 1024)
        x = self.conv(x)  ##(128, 12, 2, 1024)
        x = self.mean(x, (2, 3))  # (128, 12)
        # x = self.fc1(x)  # (128, 12)
        x = self.funcs[self.i](x)
        x = self.cast(x, ms.int32)  # (#(128, 12)
        x = self.embedding(x)  # (128, 12, 3)
        x = self.mean(x, (2))  # (128, 12)

        return x

Train this netwrok using auto_parallel mode.

Describe the current behavior

输入图片说明

Describe the expected behavior

finish train normally

Related log / screenshot

Special notes for this issue

评论 (4)

echo_hua 创建了Bug-Report
echo_hua 计划截止日期设置为2020-12-31
echo_hua 关联仓库设置为MindSpore/mindspore
echo_hua 负责人设置为suteng
echo_hua 里程碑设置为B-ME
echo_hua 计划开始日期设置为2020-08-25
echo_hua 优先级设置为次要
echo_hua 添加协作者yangzhenzhang
zhunaipan 负责人suteng 修改为echo_hua
zhunaipan 添加协作者suteng
zhunaipan 里程碑B-ME 修改为B-SolutionTest
zhunaipan 里程碑B-SolutionTest 修改为B-ComponentTest
展开全部操作日志

已转需求。

echo_hua 添加了
 
ccb/rfc
标签
echo_hua 里程碑B-ComponentTest 修改为B-RFC
zhunaipan 添加了
 
sig/parallel
标签
zhunaipan 添加了kind/feature(已删除)标签
echo_hua 添加协作者echo_hua
echo_hua 负责人echo_hua 修改为chentanjie
echo_hua 取消协作者echo_hua

hello, @echo_hua , Has this problem been resolved? If yes, please close this issue, thanks!
你好, @echo_hua , 这个问题是否已经解决了呢? 如果是的,请关闭这个issue, 谢谢!

hello, @echo_hua , Has this problem been resolved? If yes, please close this issue, thanks!
你好, @echo_hua , 这个问题是否已经解决了呢? 如果是的,请关闭这个issue, 谢谢!

hello, @echo_hua , Has this problem been resolved? If it is in progress, please change the status to WIP. If the issue was solved, please close this issue, thanks!
你好, @echo_hua , 这个问题是否已经解决了呢? 如果正在进行中,请把issue状态设置为WIP;如果问题已解决,请关闭这个issue, 谢谢!

echo_hua 移除了kind/feature(已删除)标签

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(5)
6560119 panza 1584156773 8777557 test bot 1617846881 6518137 suteng1111 1584787358
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore

搜索帮助