进行模型训练时在CPU上可以运行,在GPU上会报错
收藏回复举报
进行模型训练时在CPU上可以运行,在GPU上会报错
t('forum.solved') 已解决
新人帖
发表于2023-11-01 22:15:04
0 查看
模型是从Pytorch迁移过来的。 没有使用GPU不支持的算子。报错信息如下:

  File "code/main.py", line 92, in main 

    train() 

  File "/code/code/train.py", line 86, in train 

    loss, acc = train_step(data, real_label) 

  File "/opt/conda/lib/python3.7/site-packages/mindspore/common/api.py", line 718, in staging_specialize 

    out = _MindsporeFunctionExecutor(func, hash_obj, input_signature, process_obj, jit_config)(*args, **kwargs) 

  File "/opt/conda/lib/python3.7/site-packages/mindspore/common/api.py", line 121, in wrapper 

    results = fn(*arg, **kwargs) 

  File "/opt/conda/lib/python3.7/site-packages/mindspore/common/api.py", line 356, in __call__ 

    output = self._graph_executor(tuple(new_inputs), phase) 

RuntimeError:  

---------------------------------------------------- 

- CUDA Error: 

---------------------------------------------------- 

For 'MirrorPadGrad', it launch memcopy failed. | Error Number: 1 invalid argument 

 

---------------------------------------------------- 

- C++ Call Stack: (For framework developers) 

---------------------------------------------------- 

mindspore/ccsrc/plugin/device/gpu/kernel/nn/mirror_pad_grad_gpu_kernel.cc:54 LaunchKernel 

我要发帖子