pytorch / pytorch/executorch

Issue with run the Cadence demo on Ubuntu 22.04

Open
#11,050 8 comments 0 reactions 1 assignee View on GitHub

@zonglinpeng is already working on this.

Since May 23, 2025.

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

Description

🐛 Describe the bug

I'm trying to follow the Executorch tutorials for Cadence backend. https://docs.pytorch.org/executorch/stable/backends-cadence.html
After doing all the prerequisites and follow all the steps. I could generate portable add.pte model using "python3 -m examples.portable.scripts.export --model_name="add""
However for the next step, "python3 -m examples.cadence.operators.test_quantized_linear_op", I could see the CXX finish build most part but it will stop at the link stage. The error code shows below. It seems missing -lcadence_kernels, what is this file? and how should I fix it.

"/RegisterCodegenUnboxedKernelsEverything.cpp.o
[ 96%] Linking CXX static library libcadence_ops_lib.a
[ 96%] Built target cadence_ops_lib
[ 98%] Building CXX object CMakeFiles/cadence_runner.dir/home/adi/Desktop/ExecuTorch/Executorch_git/executorch/examples/devtools/example_runner/example_runner.cpp.o
[100%] Linking CXX executable cadence_runner
/usr/bin/ld: cannot find -lcadence_kernels: No such file or directory
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/cadence_runner.dir/build.make:111: cadence_runner] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/cadence_runner.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/executor.py", line 94, in execute
return _execute_subprocess(args)
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/executor.py", line 78, in _execute_subprocess
raise subprocess.CalledProcessError(p.returncode, p.args, stdout, stderr)
subprocess.CalledProcessError: Command '['./backends/cadence/build_cadence_runner.sh']' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/adi/Desktop/ExecuTorch/Executorch_git/executorch/examples/cadence/operators/test_quantized_linear_op.py", line 44, in
export_model(model, example_inputs)
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/aot/export_example.py", line 89, in export_model
runtime.run_and_compare(
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/runtime.py", line 222, in run_and_compare
outputs = run(executorch_prog, inputs, ref_outputs, working_dir)
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/runtime.py", line 160, in run
executor()
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/executor.py", line 117, in call
execute(args)
File "/home/adi/Desktop/ExecuTorch/Executorch_git/.venv/lib/python3.10/site-packages/executorch/backends/cadence/runtime/executor.py", line 97, in execute
raise RuntimeError(
RuntimeError: Failed to execute. Use the following to debug:
fdb ./backends/cadence/build_cadence_runner.sh
"

Versions

Collecting environment information...
PyTorch version: 2.7.0+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: glibc-2.35

Python version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: 11.5.119
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: Quadro P1000
Nvidia driver version: 550.144.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

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): 12
On-line CPU(s) list: 0-11
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
CPU family: 6
Model: 158
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
Stepping: 10
CPU max MHz: 4300.0000
CPU min MHz: 800.0000
BogoMIPS: 5199.98
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi sgx_lc md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 192 KiB (6 instances)
L1i cache: 192 KiB (6 instances)
L2 cache: 1.5 MiB (6 instances)
L3 cache: 9 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-11
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Mitigation; TSX disabled

Versions of relevant libraries:
[pip3] executorch==0.6.0a0+65ab993
[pip3] numpy==2.2.5
[pip3] torch==2.7.0+cpu
[pip3] torchao==0.10.0+git8b264ce1
[pip3] torchaudio==2.7.0+cpu
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.22.0+cpu
[conda] executorch 0.6.0a0+65ab993 pypi_0 pypi
[conda] numpy 2.2.5 pypi_0 pypi
[conda] torch 2.7.0+cpu pypi_0 pypi
[conda] torchao 0.10.0+git8b264ce1 pypi_0 pypi
[conda] torchaudio 2.7.0+cpu pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchvision 0.22.0+cpu pypi_0 pypi

cc @mcremon-meta

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.