2.3K Star 8K Fork 4.2K

GVPMindSpore / mindspore

 / 详情

[CT][MS][OP][GPU]Computes the gradients of LSTM is error

DONE
Bug-Report
创建于  
2020-05-19 15:10
name about labels
Bug Report Use this template for reporting a bug kind/bug

Environment

  • Hardware Environment(Ascend/GPU/CPU):

Uncomment only one /device <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:
/device gpu

  • Software Environment:
    -- MindSpore version (source or binary):ME+GPU
    -- 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

Steps to reproduce the issue

  1. pytest -s test_lstm.py::test_lstm_input_3_5_10_is_10_hs_12_nl_2_batch_first_true

Describe the current behavior

    def test_lstm_input_3_5_10_is_10_hs_12_nl_2_batch_first_true():
        fact = LSTMFactory(input_np=(3, 5, 10), input_s=10, hidden_s=12, num_layers=2, has_bias=True, batch_first=True, dropout=0.0, bidirectional=False)
        fact.forward_cmp()
>       fact.grad_cmp()

test_lstm.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../share/ops/lstm_ops.py:258: in grad_cmp
    out_mindspore = self.grad_mindspore_impl()
../share/ops/lstm_ops.py:154: in grad_mindspore_impl
    input_grad = grad_net_inp(input, h, c, (out_grad_np1,(out_grad_np2,out_grad_np3)))
/root/miniconda3/envs/liwuxia_gpu/lib/python3.7/site-packages/mindspore/nn/cell.py:145: in __call__
    out = self.compile_and_run(*inputs)
/root/miniconda3/envs/liwuxia_gpu/lib/python3.7/site-packages/mindspore/nn/cell.py:300: in compile_and_run
    auto_parallel_mode=self._auto_parallel_mode)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <mindspore.common.api._Executor object at 0x7f57e40e7b90>, obj = GradOfAllInputsAndParams<
  (network): WrapOp<
    (lstm): LSTM<>
    >
  >
phase = '1train.1589871176618935808', params = None, do_convert = True, auto_parallel_mode = False

    def compile(self, obj, *args, phase='predict', params=None, do_convert=True, auto_parallel_mode=False):
        """
        Compiles graph.

        Args:
            obj (Function/Cell): The function or cell instance need compile.
            args (tuple): Function or cell input arguments.
            phase (str): The name of compile phase. Default: 'predict'.
            params (OrderedDict): The parameters dictionary used for init data graph. Default: None.
            do_convert (bool): When set to True, convert ME graph to GE graph after compiling graph.
            auto_parallel_mode: When set to True, use auto parallel mode to compile graph.

        Return:
            Str, the full phase of the cell.
            Bool, if the graph has been compiled before, return False, else return True.
        """
        obj.check_names()
        args_names, args_list = _generate_pip_args(obj, *args)
        dic = dict(zip(args_names, args_list))
        key = generate_key(phase, dic)
        self.phase_prefix = str(key[1])
        if phase == 'export':
            phase = phase + '.' + str(obj.create_time)
        else:
            phase = self.phase_prefix + phase + '.' + str(obj.create_time)
        enable_debug_runtime = context.get_context("enable_debug_runtime")
        enable_ge = context.get_context("enable_ge")

        use_vm = not enable_ge or (enable_debug_runtime and context.get_context("mode") == context.PYNATIVE_MODE)

        if phase in self.compile_cache.keys():
            logger.debug("%r graph has existed.", phase)
            return phase, False

>       result = self._executor.compile(obj, args_list, phase, use_vm)
E       RuntimeError: mindspore/ccsrc/ir/dtype.cc:329 TypeIdToType] Not support the type: 14

Describe the expected behavior

Computes the gradients of LSTM is right

Related log / screenshot

Special notes for this issue

评论 (4)

HidyLi 创建了Bug-Report
HidyLi 计划截止日期设置为2020-12-31
HidyLi 关联项目设置为MindSpore Bug Tracking System
HidyLi 关联仓库设置为MindSpore/mindspore
HidyLi 负责人设置为vlne-v1
HidyLi 里程碑设置为B-ME
HidyLi 计划开始日期设置为2020-05-19
HidyLi 优先级设置为次要
HidyLi 添加了
 
kind/bug
标签
HidyLi 添加了device/gpu(已删除)标签
展开全部操作日志

今天初步定位。

Simson 任务状态TODO 修改为WIP
vlne-v1 计划截止日期2020-12-31 修改为2020-06-04
vlne-v1 计划开始日期2020-05-19 修改为2020-05-29

重新执行用例,gpu session 加载input报错。input有一个是tuple[tensor, tuple[tensor, tensor]],可能不支持。需要找测试商议怎么处理。

vlne-v1 添加协作者vlne-v1
vlne-v1 负责人vlne-v1 修改为chenfei_mindspore
vlne-v1 负责人chenfei_mindspore 修改为未设置
vlne-v1 负责人设置为vlne-v1
vlne-v1 取消协作者vlne-v1
vlne-v1 添加协作者vlne-v1
vlne-v1 负责人vlne-v1 修改为HidyLi
vlne-v1 任务状态WIP 修改为VALIDATION
vlne-v1 里程碑B-ME 修改为B-ComponentTest
HidyLi 任务状态VALIDATION 修改为TODO
HidyLi 修改了标题
HidyLi 修改了标题
si_chasing 添加了
 
ccb/rfc
标签
si_chasing 里程碑B-ComponentTest 修改为B-RFC

最新GPU后端,LSTM算子用例,全部pass

HidyLi 任务状态TODO 修改为DONE
HidyLi 移除了
 
ccb/rfc
标签
HidyLi 移除了device/gpu(已删除)标签

登录 后才可以发表评论

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

搜索帮助