Open
Description
🐛 Describe the bug
The following repro produces an artifact that can't run at runtime. I haven't looked deeply yet to figure out where the issue is, so this needs more triage. Might be in the pytorch decomp, might be in the kernels.
Repro:
import torch
from executorch.exir import to_edge_transform_and_lower, EdgeCompileConfig, to_edge
from executorch.extension.pybindings.portable_lib import _load_for_executorch_from_buffer
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv = torch.nn.Conv3d(5, 5, 3, padding_mode="circular")
def forward(self, x):
return self.conv(x)
model = Model()
inputs = (
torch.randn(1, 5, 6, 6, 6),
)
eager_outputs = model(*inputs)
print(f"Eager: {eager_outputs.shape} {eager_outputs}")
ep = torch.export.export(model.eval(), inputs)
print(ep)
lowered = to_edge_transform_and_lower(
ep,
compile_config=EdgeCompileConfig(_check_ir_validity=False)
).to_executorch()
print(lowered.exported_program())
et_model = _load_for_executorch_from_buffer(lowered.buffer)
et_outputs = et_model([*inputs])[0]
et_outputs - eager_outputs
Output:
[kernel_ops_util.cpp:345] Check failed (in.dim() == 3 || in.dim() == 4): Expect input tensor to be 3-D or 4-D, but got, 5.
[op_convolution.cpp:377] Check failed (check_convolution_args( in, weight, bias, stride, padding, dilation, transposed, output_padding, groups, out)):
[method.cpp:1322] KernelCall failed at instruction 0:5 in operator aten::convolution.out: 0x12
[method.cpp:1328] arg 0 with type id 1
[method.cpp:1328] arg 1 with type id 1
[method.cpp:1328] arg 2 with type id 1
[method.cpp:1328] arg 3 with type id 8
[method.cpp:1328] arg 4 with type id 8
[method.cpp:1328] arg 5 with type id 8
[method.cpp:1328] arg 6 with type id 5
[method.cpp:1328] arg 7 with type id 8
[method.cpp:1328] arg 8 with type id 4
[method.cpp:1328] arg 9 with type id 1
[method.cpp:1328] arg 10 with type id 1
Versions
Nightly
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To triage