KEMBAR78
[aarch64] `nn.Linear(20, 1)` inference fails · Issue #114750 · pytorch/pytorch · GitHub
Skip to content

[aarch64] nn.Linear(20, 1) inference fails #114750

@pvardanis

Description

@pvardanis

🐛 Describe the bug

Hi,

As the title indicates, I have a model created with TorchScript and saved with the .pt extension under torch==1.13.1 but when I load it back in another env using torch==2.1.1 it fails to infer.

The error is the following:

I'm also having errors when running a pt fail saved with TorchScript that was implemented with torch==1.13.1, but torch==2.1.1 raises the following:

249, in forward
        x = self.fc1(x)
        x = torch.nn.functional.relu(x)
        x = self.fc2(x)
            ~~~~~~~~ <--- HERE
        return x
  File "/Users/panagiotisvardanis/miniconda3/envs/mac-pytorch/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 114, in forward
    def forward(self, input: Tensor) -> Tensor:
        return F.linear(input, self.weight, self.bias)
               ~~~~~~~~ <--- HERE
RuntimeError: could not create a primitive descriptor for a matmul primitive

Versions

Pip requirements from the environment where the model was created:

[pip3] torch==1.13.1
[pip3] torchvision==0.14.0

Pip requirements from the environment where the model is failing to infer:

[pip3] torch==2.1.1
[pip3] torchvision==0.16.1

cc @ezyang @gchanan @zou3519 @kadeng @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @mingfeima @ashokei @jingxu10 @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen @malfet @snadampal

Metadata

Metadata

Assignees

Labels

high prioritymodule: armRelated to ARM architectures builds of PyTorch. Includes Apple M1module: mkldnnRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationmodule: nnRelated to torch.nnmodule: regressionIt used to work, and now it doesn'toncall: jitAdd this issue/PR to JIT oncall triage queuetriage review

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions