pytorch / pytorch/executorch

Convolution portable kernel missing 5D support

Open
#13,490 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: kernels triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🕵️‍♂️ Detected with FACTO
🐛 Describe the bug

FACTO Generated meta_tuple:

['ArgType.Tensor torch.float32 (8, 8, 5, 2, 7)', 'ArgType.Tensor torch.float32 (8, 8, 8, 5, 4)', 'ArgType.TensorOpt None', 'ArgType.LengthList [6]', 'ArgType.LengthList [7]', 'ArgType.LengthList [9, 1, 4]', 'ArgType.Bool True', 'ArgType.LengthList [0, 5, 3]', 'ArgType.Int 1']

error

[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:1338] KernelCall failed at instruction 0:0 in operator aten::convolution.out: 0x12
[method.cpp:1344] arg 0 with type id 1
[method.cpp:1344] arg 1 with type id 1
[method.cpp:1344] arg 2 with type id 0
[method.cpp:1344] arg 3 with type id 8
[method.cpp:1344] arg 4 with type id 8
[method.cpp:1344] arg 5 with type id 8
[method.cpp:1344] arg 6 with type id 5
[method.cpp:1344] arg 7 with type id 8
[method.cpp:1344] arg 8 with type id 4
[method.cpp:1344] arg 9 with type id 1
[method.cpp:1344] arg 10 with type id 1
Versions

nightly

cc @larryliu0820

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the check reported in kernel_ops_util.cpp around line 345 and the convolution argument validation in op_convolution.cpp around line 377. Reproduce the FACTO-generated 5D case and verify that convolution accepts the shown 5D input and weight tensors without triggering the dimensionality check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, pytorch
Domain
embedded-iot, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.