executor_runner: Check failed (all_contiguous || all_channels_last): 2 input tensors have different dim orders
Open
Nobody has claimed this yet.
module: runtime
triaged
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
Hello,
When I run my model using executor_runner, it failed:
I 00:00:00.004201 executorch:executor_runner.cpp:82] Model file ../../_models/test.pte is loaded.
I 00:00:00.004238 executorch:executor_runner.cpp:91] Using method forward
I 00:00:00.004246 executorch:executor_runner.cpp:138] Setting up planned buffer 0, size 221984.
I 00:00:00.017338 executorch:executor_runner.cpp:161] Method loaded.
I 00:00:00.017383 executorch:executor_runner.cpp:171] Inputs prepared.
E 00:00:00.059875 executorch:tensor_util_portable.cpp:128] Check failed (all_contiguous || all_channels_last): 2 input tensors have different dim orders
E 00:00:00.059906 executorch:op_permute_copy.cpp:49] Check failed (tensors_have_same_dim_order(in, out)):
E 00:00:00.059909 executorch:method.cpp:1038] KernelCall failed at instruction 0:5520 in operator aten::permute_copy.out: 0x12
E 00:00:00.059911 executorch:method.cpp:1047] arg 0 with type id 1
E 00:00:00.059912 executorch:method.cpp:1047] arg 1 with type id 8
E 00:00:00.059913 executorch:method.cpp:1047] arg 2 with type id 1
E 00:00:00.059914 executorch:method.cpp:1047] arg 3 with type id 1
F 00:00:00.059916 executorch:executor_runner.cpp:175] In function main(), assert failed (status == Error::Ok): Execution of method forward failed with status 0x12
Aborted (core dumped)
I built executor_runner by this command:
rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake ..
cmake --build cmake-out --target executor_runner -j9
Thanks for your help.
The model:
test.zip
Versions
I ran test.pte model on win11/WSL2:
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04 LTS (x86_64)
GCC version: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce MX450
Nvidia driver version: 538.78
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 6
On-line CPU(s) list: 0-5
Vendor ID: GenuineIntel
Model name: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
CPU family: 6
Model: 140
Thread(s) per core: 2
Core(s) per socket: 3
Socket(s): 1
Stepping: 1
BogoMIPS: 5606.42
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear flush_l1d arch_capabilities
Virtualization: VT-x
Hypervisor vendor: Microsoft
Virtualization type: full
L1d cache: 144 KiB (3 instances)
L1i cache: 96 KiB (3 instances)
L2 cache: 3.8 MiB (3 instances)
L3 cache: 12 MiB (1 instance)
Vulnerability Gather data sampling: Unknown: Dependent on hypervisor status
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] numpy==1.22.4
[pip3] onnx==1.12.0
[pip3] tf2onnx==1.11.1
[conda] Could not collect
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the attached test.zip model and the executor_runner entry point. Read executor_runner.cpp alongside tensor_util_portable.cpp and op_permute_copy.cpp, which appear in the reported stack trace. Done means the model executes successfully through executor_runner without the reported dimension-order failure, with regression coverage if the relevant test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, pytorch
- Domain
- embedded-iot, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100