运行时错误:无法初始化PyTorch Neuron Runtime。

0

【以下的问题经过翻译处理】 我刚开始在Inf1上使用Neuron,并且正在按照示例操作。我完成了resnet50例子,没有问题。然后我尝试按照BERT示例操作,但出现以下错误。我按照这些故障排除步骤操作——Neuron已安装,我没有看到其他错误。

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_27071/3834338657.py in <module>
     35 
     36 # Verify the TorchScript works on both example inputs
---> 37 paraphrase_classification_logits_neuron = model_neuron(*example_inputs_paraphrase)
     38 not_paraphrase_classification_logits_neuron = model_neuron(*example_inputs_not_paraphrase)
     39 

~/pytorch_venv/lib64/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1108         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110             return forward_call(*input, **kwargs)
   1111         # Do not call functions when jit is used
   1112         full_backward_hooks, non_full_backward_hooks = [], []

RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
/home/ec2-user/pytorch_venv/lib64/python3.7/site-packages/torch_neuron/decorators.py(372): forward
/home/ec2-user/pytorch_venv/lib64/python3.7/site-packages/torch/nn/modules/module.py(1098): _slow_forward
/home/ec2-user/pytorch_venv/lib64/python3.7/site-packages/torch/nn/modules/module.py(111
profile picture
EXPERTE
gefragt vor 5 Monaten22 Aufrufe
1 Antwort
0

【以下的回答经过翻译处理】 当我在笔记本电脑中执行运行编译脚本的特定单元格时,我从jupyter进程看到了此输出:

ERROR   NRT:nrt_allocate_neuron_cores               NeuronCore(s) not available - Requested:4 Available:0

问题是之前遵循的示例中已经有一个笔记本电脑正在运行。现在我感到有些可笑 :)

profile picture
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen